mirror of
https://github.com/MinecraftServerControl/mscs.git
synced 2024-11-15 14:58:18 -07:00
Completion - Use the same whitespace pattern as the init.d script
This commit is contained in:
parent
3e61b08b00
commit
a3ae02e2b4
@ -1,27 +1,27 @@
|
|||||||
_minecraft_server() {
|
_minecraft_server() {
|
||||||
local CUR PREV OPTS WORLDS
|
local CUR PREV OPTS WORLDS
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
CUR=${COMP_WORDS[COMP_CWORD]}
|
CUR=${COMP_WORDS[COMP_CWORD]}
|
||||||
PREV=${COMP_WORDS[COMP_CWORD-1]}
|
PREV=${COMP_WORDS[COMP_CWORD-1]}
|
||||||
|
|
||||||
OPTS="start stop force-stop restart force-restart create new delete remove
|
OPTS="start stop force-stop restart force-restart create new delete remove
|
||||||
disable enable status show sync send screen watch logrotate backup update
|
disable enable status show sync send screen watch logrotate backup update
|
||||||
map overviewer"
|
map overviewer"
|
||||||
|
|
||||||
if [ $COMP_CWORD -eq 1 ]; then
|
if [ $COMP_CWORD -eq 1 ]; then
|
||||||
COMPREPLY=($(compgen -W "$OPTS" -- $CUR))
|
COMPREPLY=($(compgen -W "$OPTS" -- $CUR))
|
||||||
else
|
else
|
||||||
case $PREV in
|
case $PREV in
|
||||||
start|stop|force-stop|restart|force-restart|create|new|delete|remove| \
|
start|stop|force-stop|restart|force-restart|create|new|delete|remove| \
|
||||||
disable|enable|status|show|sync|send|screen|watch|logrotate|backup| \
|
disable|enable|status|show|sync|send|screen|watch|logrotate|backup| \
|
||||||
map|overviewer)
|
map|overviewer)
|
||||||
WORLDS="world"
|
WORLDS="world"
|
||||||
COMPREPLY=($(compgen -W "$WORLDS" -- $CUR))
|
COMPREPLY=($(compgen -W "$WORLDS" -- $CUR))
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
complete -F _minecraft_server /etc/init.d/minecraft_server
|
complete -F _minecraft_server /etc/init.d/minecraft_server
|
||||||
|
Loading…
Reference in New Issue
Block a user