From 5dfbdd690030e08142e39837ecdf275f959b3ba6 Mon Sep 17 00:00:00 2001 From: Marcus Whybrow Date: Thu, 31 May 2012 07:18:08 +0100 Subject: [PATCH] Added bash completion for "server" commands. --- bash_completion/msm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bash_completion/msm b/bash_completion/msm index bf9acdf..ef9d653 100644 --- a/bash_completion/msm +++ b/bash_completion/msm @@ -9,15 +9,7 @@ _msm() { if [[ $COMP_CWORD -gt 1 ]]; then case "$base" in - start) - # Do nothing there is no more - ;; - stop) - if [[ $COMP_CWORD == 2 ]]; then - options="now" - fi - ;; - restart) + stop|restart) if [[ $COMP_CWORD == 2 ]]; then options="now" fi @@ -25,6 +17,14 @@ _msm() { server) if [[ $COMP_CWORD == 2 ]]; then options="list create delete rename" + else + case ${COMP_WORDS[2]} in + delete|rename) + if [[ $COMP_CWORD == 3 ]]; then + options=$(ls -1 $SERVER_STORAGE_PATH) + fi + ;; + esac fi ;; jargroup)