[BACK]Return to mtctl-completion.bash CVS log [TXT][DIR] Up to [local] / mtctl

Diff for /mtctl/mtctl-completion.bash between version 1.1 and 1.2

version 1.1, 2021/08/31 17:00:08 version 1.2, 2021/09/26 14:02:56
Line 1 
Line 1 
 _mtctl_completions() {  _mtctl_completions() {
         case $COMP_CWORD in          case $COMP_CWORD in
                 1) local suggestions=($(compgen -W "start stop restart status create list version help" -- "${COMP_WORDS[1]}"))                  1) local suggestions=($(compgen -W "start stop restart status create backup list version help" -- "${COMP_WORDS[1]}"))
                 ;;                  ;;
                 2) if [ "${COMP_WORDS[1]}" == "help" ] || [ "${COMP_WORDS[1]}" == "list" ] || [ "${COMP_WORDS[1]}" == "version" ]; then return; fi                  2) if [ "${COMP_WORDS[1]}" == "help" ] || [ "${COMP_WORDS[1]}" == "list" ] || [ "${COMP_WORDS[1]}" == "version" ]; then return; fi
                         local suggestions=($(cd {WORLDFOLDER} && compgen -d "${COMP_WORDS[2]}"))                          local suggestions=($(cd $(cat $HOME/.mtctl/config | grep 'location' | sed -e 's/location\=//')/worlds && compgen -d "${COMP_WORDS[2]}"))
                 ;;                  ;;
                 *) return                  *) return
                 ;;                  ;;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

CVSweb