Added bash completion for "server" commands.

This commit is contained in:
Marcus Whybrow 2012-05-31 07:18:08 +01:00
parent cd293d7209
commit 5dfbdd6900

View File

@ -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)