|
@ -10,6 +10,9 @@ EEAUTO() |
|
|
# Get Previous Word |
|
|
# Get Previous Word |
|
|
local PREVIOUS=${COMP_WORDS[COMP_CWORD-1]} |
|
|
local PREVIOUS=${COMP_WORDS[COMP_CWORD-1]} |
|
|
|
|
|
|
|
|
|
|
|
# Use All Word Twice |
|
|
|
|
|
local EEALL=${COMP_WORDS[COMP_CWORD-2]} |
|
|
|
|
|
|
|
|
# List Of Suggested Words |
|
|
# List Of Suggested Words |
|
|
case "$PREVIOUS" in |
|
|
case "$PREVIOUS" in |
|
|
|
|
|
|
|
@ -45,11 +48,19 @@ EEAUTO() |
|
|
return 0 |
|
|
return 0 |
|
|
;; |
|
|
;; |
|
|
|
|
|
|
|
|
show|info|enable|db|files|all) |
|
|
show|info|enable|db|files) |
|
|
COMPREPLY=( $( compgen -W '$(command find /etc/nginx/sites-available/ -type f -printf "%P " 2>/dev/null)' -- $CURRENT ) ) |
|
|
COMPREPLY=( $( compgen -W '$(command find /etc/nginx/sites-available/ -type f -printf "%P " 2>/dev/null)' -- $CURRENT ) ) |
|
|
return 0 |
|
|
return 0 |
|
|
;; |
|
|
;; |
|
|
|
|
|
|
|
|
|
|
|
all) |
|
|
|
|
|
if [ "$EEALL" = "delete" ] |
|
|
|
|
|
then |
|
|
|
|
|
COMPREPLY=( $( compgen -W '$(command find /etc/nginx/sites-available/ -type f -printf "%P " 2>/dev/null)' -- $CURRENT ) ) |
|
|
|
|
|
fi |
|
|
|
|
|
return 0 |
|
|
|
|
|
;; |
|
|
|
|
|
|
|
|
disable) |
|
|
disable) |
|
|
COMPREPLY=( $( compgen -W '$(command find /etc/nginx/sites-enabled/ -type l -printf "%P " 2>/dev/null)' -- $CURRENT ) ) |
|
|
COMPREPLY=( $( compgen -W '$(command find /etc/nginx/sites-enabled/ -type l -printf "%P " 2>/dev/null)' -- $CURRENT ) ) |
|
|
return 0 |
|
|
return 0 |
|
|