Browse Source

updated autocompletion for ee debug command

bugfixes
harshadyeola 10 years ago
parent
commit
08badcf016
  1. 17
      config/bash_completion.d/ee_auto.rc

17
config/bash_completion.d/ee_auto.rc

@ -29,7 +29,7 @@ _ee_complete()
# IF YOU HAD ANOTHER CONTROLLER, YOU'D HANDLE THAT HERE # IF YOU HAD ANOTHER CONTROLLER, YOU'D HANDLE THAT HERE
"debug") "debug")
COMPREPLY=( $(compgen \ COMPREPLY=( $(compgen \
-W "$(command find /etc/nginx/sites-enabled/ -type l -printf "%P " 2> /dev/null) --start --nginx --php --fpm --mysql -i --interactive --stop " \ -W "$(command find /etc/nginx/sites-enabled/ -type l -printf "%P " 2> /dev/null) --nginx --php --fpm --mysql -i --interactive --all --nginx=off --php=off --fpm=off --mysql=off --all=off " \
-- $cur) ) -- $cur) )
;; ;;
@ -110,7 +110,7 @@ _ee_complete()
esac esac
if [ ${COMP_WORDS[1]} == "debug" ] && ([ "$prev" != "--start" ] || [ "$prev" != "--nginx" ] || [ "$prev" != "--php" ] || [ "$prev" != "--fpm" ] || [ "$prev" != "--mysql" ] || [ "$prev" != "-i" ] || ["$prev" != "--interactive" ] || ["$prev" != "--stop" ]); then if [ ${COMP_WORDS[1]} == "debug" ] && ([ "$prev" != "--start" ] || [ "$prev" != "--nginx" ] || [ "$prev" != "--php" ] || [ "$prev" != "--fpm" ] || [ "$prev" != "--mysql" ] || [ "$prev" != "-i" ] || ["$prev" != "--interactive" ] || ["$prev" != "--stop" ]); then
retlist="--start --stop --wp --rewrite -i" retlist="--all --wp --rewrite -i --all=off --wp=off --rewrite=off"
ret="${retlist[@]/$prev}" ret="${retlist[@]/$prev}"
COMPREPLY=( $(compgen \ COMPREPLY=( $(compgen \
-W "$(echo $ret)" \ -W "$(echo $ret)" \
@ -145,9 +145,16 @@ _ee_complete()
case "$prev" in case "$prev" in
"--wp" | "--wpsubdir" | "--wpsubdomain") "--wp" | "--wpsubdir" | "--wpsubdomain")
COMPREPLY=( $(compgen \ if [ ${COMP_WORDS[1]} != "debug" ]; then
-W "--w3tc --wpfc --wpsc" \ retlist="--w3tc --wpfc --wpsc"
-- $cur) ) else
retlist="--wp=off --rewrite --rewrite=off -i --interactive"
fi
ret="${retlist[@]/$prev}"
COMPREPLY=( $(compgen \
-W "$(echo $ret)" \
-- $cur) )
;; ;;
"--web" | "--admin" | "--mail" | "--nginx" | "--php" | "--mysql" | "--postfix" | "--wpcli" | "--phpmyadmin" | "--adminer" | "--utils" | "--memcache" | "--dovecot") "--web" | "--admin" | "--mail" | "--nginx" | "--php" | "--mysql" | "--postfix" | "--wpcli" | "--phpmyadmin" | "--adminer" | "--utils" | "--memcache" | "--dovecot")

Loading…
Cancel
Save