mirror of
https://github.com/MinecraftServerControl/mscs.git
synced 2024-11-15 06:48:16 -07:00
Default to the OPTS list only on the first COMP_CWORD
This commit is contained in:
parent
0cf40a409d
commit
8a6d99aeee
@ -8,6 +8,9 @@ _minecraft_server() {
|
||||
disable enable status show sync send screen watch logrotate backup
|
||||
map overviewer update"
|
||||
|
||||
if [ $COMP_CWORD -eq 1 ]; then
|
||||
COMPREPLY=($(compgen -W "$OPTS" -- $CUR))
|
||||
else
|
||||
case "$PREV" in
|
||||
start|stop|force-stop|restart|force-restart|delete|remove|disable|\
|
||||
sync|send|screen|watch|logrotate|backup|map|overviewer)
|
||||
@ -18,8 +21,7 @@ _minecraft_server() {
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
COMPREPLY=($(compgen -W "$OPTS" -- $CUR))
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
complete -F _minecraft_server /etc/init.d/minecraft_server
|
||||
|
Loading…
Reference in New Issue
Block a user