diff options
author | Robert Štětka | 2023-03-28 18:28:52 +0200 |
---|---|---|
committer | Robert Štětka | 2023-03-28 18:49:31 +0200 |
commit | 7b5120e6af934a22810649b8e240c0d14257d905 (patch) | |
tree | e46fc1d676fa0ed5b5ad53e911a48a922caeef8e /_ehh | |
download | aur-ehh.tar.gz |
Initial commit
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 +} |