mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-11-15 06:11:12 +00:00
ba9900a488
Conflicts: .gitignore lib/aliases.zsh lib/completion.zsh lib/functions.zsh lib/git.zsh lib/key-bindings.zsh lib/misc.zsh lib/spectrum.zsh plugins/git/git.plugin.zsh plugins/osx/_man-preview plugins/osx/osx.plugin.zsh plugins/svn/svn.plugin.zsh templates/zshrc.zsh-template themes/lukerandall.zsh-theme themes/philips.zsh-theme tools/upgrade.sh
35 lines
847 B
Plaintext
35 lines
847 B
Plaintext
#compdef gas
|
|
|
|
local curcontext="$curcontext" state line cmds ret=1
|
|
|
|
_arguments -C \
|
|
'(- 1 *)'{-v,--version}'[display version information]' \
|
|
'(-h|--help)'{-h,--help}'[show help information]' \
|
|
'1: :->cmds' \
|
|
'*: :->args' && ret=0
|
|
|
|
case $state in
|
|
cmds)
|
|
cmds=(
|
|
"version:Prints Gas's version"
|
|
"use:Uses author"
|
|
"show:Shows your current user"
|
|
"list:Lists your authors"
|
|
"import:Imports current user to gasconfig"
|
|
"help:Describe available tasks or one specific task"
|
|
"delete:Deletes author"
|
|
"add:Adds author to gasconfig"
|
|
)
|
|
_describe -t commands 'gas command' cmds && ret=0
|
|
;;
|
|
args)
|
|
case $line[1] in
|
|
(use|delete)
|
|
_values -S , 'authors' $(cat ~/.gas | sed -n -e 's/^\[\(.*\)\]/\1/p') && ret=0
|
|
;;
|
|
esac
|
|
;;
|
|
esac
|
|
|
|
return ret
|