summarylogtreecommitdiffstats
path: root/_ehh
diff options
context:
space:
mode:
Diffstat (limited to '_ehh')
-rw-r--r--_ehh14
1 files changed, 14 insertions, 0 deletions
diff --git a/_ehh b/_ehh
new file mode 100644
index 000000000000..045eed6eee65
--- /dev/null
+++ b/_ehh
@@ -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
+}