From 8c9e30087d1631b5e40b0a3c64b083e4940bd407 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Thu, 10 Jul 2014 20:15:39 +0530 Subject: [PATCH] Autocompletion for ee stack --- config/bash_completion.d/ee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/bash_completion.d/ee b/config/bash_completion.d/ee index fdc7f8ba..c5529b41 100644 --- a/config/bash_completion.d/ee +++ b/config/bash_completion.d/ee @@ -17,17 +17,17 @@ EEAUTO() # List Of Suggested Words easyengine|ee) - COMPREPLY=( $(compgen -W "version info update help system site debug" -- $CURRENT) ) + COMPREPLY=( $(compgen -W '$(echo version info; command find /usr/local/lib/easyengine/modules/ -maxdepth 1 -type d -printf "%P " 2>/dev/null)' -- $CURRENT) ) return 0 ;; - system) - COMPREPLY=( $( compgen -W "install remove purge status start stop reload restart" -- $CURRENT ) ) + stack) + COMPREPLY=( $( compgen -W '$(echo purge status stop start reload restart; command find /usr/local/lib/easyengine/modules/stack -maxdepth 1 -type d -printf "%P " 2>/dev/null)' -- $CURRENT ) ) return 0 ;; install|remove|purge) - COMPREPLY=( $( compgen -W "nginx php mysql phpmyadmin postfix all" -- $CURRENT ) ) + COMPREPLY=( $( compgen -W '$( cd /usr/local/lib/easyengine/modules/stack/install; find -type f | grep install | cut -d'_' -f4 | cut -d '.' -f1; cd /usr/local/lib/easyengine/vendor/; find -type f | grep install | cut -d'_' -f4 | cut -d '.' -f1)' -- $CURRENT ) ) return 0 ;;