diff options
Diffstat (limited to '_ehh')
-rw-r--r-- | _ehh | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -0,0 +1,14 @@ +#compdef ehh +_ehh() { + local -a ehh_commands + local -a ehh_aliases + + ehh_commands=('add' 'get' 'help' 'ls' 'rm' 'run') + ehh_aliases=($(ehh ls | awk -F ' ' '{print $4}' | awk -F ' ' 'NF {print $1}')) + + if [[ $words[2] != 'run' ]]; then + compadd $ehh_commands $ehh_aliases + else + compadd $ehh_aliases + fi +} |