From 63115760d2936c3e33cbfaedcbec29f9837dee72 Mon Sep 17 00:00:00 2001 From: Erwan ROUSSEL Date: Mon, 29 Oct 2018 22:16:01 +0100 Subject: [PATCH] Add dynamic autocompletion --- plugins/adonis/adonis.plugin.zsh | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/plugins/adonis/adonis.plugin.zsh b/plugins/adonis/adonis.plugin.zsh index 391cd93df..2d734c0c9 100644 --- a/plugins/adonis/adonis.plugin.zsh +++ b/plugins/adonis/adonis.plugin.zsh @@ -6,33 +6,7 @@ # Author: Dimensi0n | Erwan ROUSSEL _adonis() { - local -a subcmds - - subcmds=( - 'addon:Create a new AdonisJs addon' - 'install:' - 'new' - 'repl' - 'serve' - 'key\\:generate' - 'make\\:command' - 'make\\:controller' - 'make\\:ehandler' - 'make\\:exception' - 'make\\:hook' - 'make\\:listener' - 'make\\:middleware' - 'make\\:migration' - 'make\\:model' - 'make\\:provider' - 'make\\:seed' - 'make\\:trait' - 'make\\:view' - 'route\\:list' - 'run\\:instructions' - ) - - _describe 'adonis' subcmds + compadd `adonis | cut -d " " -f 3 | sed -E "s/.\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | tail -n+7 | sed '/^\s*$/d'` } compdef _adonis adonis \ No newline at end of file