mirror of
https://github.com/msmhq/msm.git
synced 2024-08-30 18:12:35 +00:00
Added bash completion for "server" commands.
This commit is contained in:
parent
cd293d7209
commit
5dfbdd6900
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user