|
@ -94,12 +94,18 @@ _ee_complete() |
|
|
;; |
|
|
;; |
|
|
|
|
|
|
|
|
"edit" | "enable" | "info" | "log" | "show" | "cd" | "update" | "delete") |
|
|
"edit" | "enable" | "info" | "log" | "show" | "cd" | "update" | "delete") |
|
|
COMPREPLY=( $(compgen \ |
|
|
if [ ${COMP_WORDS[1]} == "log" ]; then |
|
|
-W "$(find /etc/nginx/sites-available/ -type f -printf "%P " 2> /dev/null)" \ |
|
|
COMPREPLY=( $(compgen \ |
|
|
-- $cur) ) |
|
|
-W "$(find /etc/nginx/sites-available/ -type f -printf "%P " 2> /dev/null) --nginx --php --fpm --mysql --wp --access" \ |
|
|
|
|
|
-- $cur) ) |
|
|
|
|
|
else |
|
|
|
|
|
COMPREPLY=( $(compgen \ |
|
|
|
|
|
-W "$(find /etc/nginx/sites-available/ -type f -printf "%P " 2> /dev/null)" \ |
|
|
|
|
|
-- $cur) ) |
|
|
|
|
|
fi |
|
|
;; |
|
|
;; |
|
|
|
|
|
|
|
|
"show" | "gzip" | "email") |
|
|
"gzip" | "email") |
|
|
COMPREPLY=( $(compgen \ |
|
|
COMPREPLY=( $(compgen \ |
|
|
-W "$(find /etc/nginx/sites-available/ -type f -printf "%P " 2> /dev/null) --nginx --php --fpm --mysql --wp --access" \ |
|
|
-W "$(find /etc/nginx/sites-available/ -type f -printf "%P " 2> /dev/null) --nginx --php --fpm --mysql --wp --access" \ |
|
|
-- $cur) ) |
|
|
-- $cur) ) |
|
@ -129,13 +135,13 @@ _ee_complete() |
|
|
-- $cur) ) |
|
|
-- $cur) ) |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
if [ ${COMP_WORDS[1]} == "log" ] && ([ "$prev" != "--access" ] || [ "$prev" != "--nginx" ] || [ "$prev" != "--php" ] || [ "$prev" != "--fpm" ] || [ "$prev" != "--mysql" ] || [ "$prev" != "-i" ] || ["$prev" != "--interactive" ] || ["$prev" != "--stop" ]); then |
|
|
#if [ ${COMP_WORDS[1]} == "log" ] && ([ "$prev" != "--access" ] || [ "$prev" != "--nginx" ] || [ "$prev" != "--php" ] || [ "$prev" != "--fpm" ] || [ "$prev" != "--mysql" ] || [ "$prev" != "-i" ] || ["$prev" != "--interactive" ] || ["$prev" != "--stop" ]); then |
|
|
retlist="--all --wp --rewrite -i --all=off --wp=off --rewrite=off" |
|
|
# 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)" \ |
|
|
-- $cur) ) |
|
|
# -- $cur) ) |
|
|
fi |
|
|
#fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
elif [ $COMP_CWORD -eq 4 ]; then |
|
|
elif [ $COMP_CWORD -eq 4 ]; then |
|
|