Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions completion/boom.zsh

This file was deleted.

1 change: 1 addition & 0 deletions completion/boom.zsh
29 changes: 29 additions & 0 deletions completion/zsh/_boom
Original file line number Diff line number Diff line change
@@ -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