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
|
if [[ $COMP_CWORD -gt 1 ]]; then
|
||||||
case "$base" in
|
case "$base" in
|
||||||
start)
|
stop|restart)
|
||||||
# Do nothing there is no more
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
if [[ $COMP_CWORD == 2 ]]; then
|
|
||||||
options="now"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
restart)
|
|
||||||
if [[ $COMP_CWORD == 2 ]]; then
|
if [[ $COMP_CWORD == 2 ]]; then
|
||||||
options="now"
|
options="now"
|
||||||
fi
|
fi
|
||||||
@ -25,6 +17,14 @@ _msm() {
|
|||||||
server)
|
server)
|
||||||
if [[ $COMP_CWORD == 2 ]]; then
|
if [[ $COMP_CWORD == 2 ]]; then
|
||||||
options="list create delete rename"
|
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
|
fi
|
||||||
;;
|
;;
|
||||||
jargroup)
|
jargroup)
|
||||||
|
Loading…
Reference in New Issue
Block a user