diff options
author | Michael Muré <batolettre@gmail.com> | 2019-10-12 18:10:44 +0900 |
---|---|---|
committer | amine <hilalyamine@gmail.com> | 2019-11-09 13:26:48 +0100 |
commit | 3984919a3df95b8ec203bcb82b66c9c2270579c7 (patch) | |
tree | 1a32f0978e76f097edf2635191e6940b990efe05 /misc/zsh_completion | |
parent | 3433fa5def3fb3c2707bae1aeb4ae1bd62c930de (diff) | |
download | git-bug-3984919a3df95b8ec203bcb82b66c9c2270579c7.tar.gz |
bridge: various cleanups
Diffstat (limited to 'misc/zsh_completion')
-rw-r--r-- | misc/zsh_completion/git-bug | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/misc/zsh_completion/git-bug b/misc/zsh_completion/git-bug index 9951bab9..1f4679ad 100644 --- a/misc/zsh_completion/git-bug +++ b/misc/zsh_completion/git-bug @@ -118,6 +118,7 @@ function _git-bug_bridge { "pull:Pull updates." "push:Push updates." "rm:Delete a configured bridge." + "token:Configure and use bridge tokens." ) _describe "command" commands ;; @@ -136,6 +137,9 @@ function _git-bug_bridge { rm) _git-bug_bridge_rm ;; + token) + _git-bug_bridge_token + ;; esac } @@ -164,6 +168,48 @@ function _git-bug_bridge_rm { _arguments } + +function _git-bug_bridge_token { + local -a commands + + _arguments -C \ + '(-l --local)'{-l,--local}'[]' \ + '(-g --global)'{-g,--global}'[]' \ + "1: :->cmnds" \ + "*::arg:->args" + + case $state in + cmnds) + commands=( + "add:Configure and use bridge tokens." + "rm:Configure and use bridge tokens." + ) + _describe "command" commands + ;; + esac + + case "$words[1]" in + add) + _git-bug_bridge_token_add + ;; + rm) + _git-bug_bridge_token_rm + ;; + esac +} + +function _git-bug_bridge_token_add { + _arguments \ + '(-g --global)'{-g,--global}'[]' \ + '(-v --value)'{-v,--value}'[]:' \ + '(-t --target)'{-t,--target}'[]:' \ + '(*-s *--scopes)'{\*-s,\*--scopes}'[]:' +} + +function _git-bug_bridge_token_rm { + _arguments +} + function _git-bug_commands { _arguments \ '(-p --pretty)'{-p,--pretty}'[Output the command description as well as Markdown compatible comment]' |