From 350a07b0a8525645671a029621cc873b2a8d1957 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Tue, 9 Feb 2016 14:16:10 +0100 Subject: Fixed oh-my-zsh --- zsh/functions/_boom | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 zsh/functions/_boom (limited to 'zsh/functions/_boom') diff --git a/zsh/functions/_boom b/zsh/functions/_boom new file mode 100644 index 0000000..74e5d4e --- /dev/null +++ b/zsh/functions/_boom @@ -0,0 +1,29 @@ +#compdef boom + +local state line cmds ret=1 + +_arguments -C '1: :->cmds' '*: :->args' + +case $state in + cmds) + local -a cmds + cmds=( + 'all:show all items in all lists' + 'edit:edit the boom JSON file in $EDITOR' + 'help:help text' + ) + _describe -t commands 'boom command' cmds && ret=0 + _values 'lists' $(boom | awk '{print $1}') + ;; + args) + case $line[1] in + (boom|all|edit|help) + ;; + *) + _values 'items' `boom $line[1] | awk '{print $1}' | sed -e 's/://'` 2>/dev/null && ret=0 + ;; + esac + ;; +esac + +return ret -- cgit v1.2.3