aboutsummaryrefslogtreecommitdiffstats
path: root/misc/zsh_completion
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-11-10 17:32:14 +0100
committerMichael Muré <batolettre@gmail.com>2019-11-10 17:33:44 +0100
commite0b15ee7644c20533156850e0be5a07597967450 (patch)
treea7ebd32de0b94b63ebe825c829de963470d03cab /misc/zsh_completion
parentf8cf3fea035d7f0ad0287166c3a5016777acf5ad (diff)
downloadgit-bug-e0b15ee7644c20533156850e0be5a07597967450.tar.gz
cli: rename "token" into "auth"
Diffstat (limited to 'misc/zsh_completion')
-rw-r--r--misc/zsh_completion/git-bug80
1 files changed, 40 insertions, 40 deletions
diff --git a/misc/zsh_completion/git-bug b/misc/zsh_completion/git-bug
index f0ff7edf..230061dd 100644
--- a/misc/zsh_completion/git-bug
+++ b/misc/zsh_completion/git-bug
@@ -114,17 +114,20 @@ function _git-bug_bridge {
case $state in
cmnds)
commands=(
+ "auth:List all known bridge authentication credentials."
"configure:Configure a new bridge."
"pull:Pull updates."
"push:Push updates."
"rm:Delete a configured bridge."
- "token:List all known tokens."
)
_describe "command" commands
;;
esac
case "$words[1]" in
+ auth)
+ _git-bug_bridge_auth
+ ;;
configure)
_git-bug_bridge_configure
;;
@@ -137,39 +140,11 @@ function _git-bug_bridge {
rm)
_git-bug_bridge_rm
;;
- token)
- _git-bug_bridge_token
- ;;
esac
}
-function _git-bug_bridge_configure {
- _arguments \
- '(-n --name)'{-n,--name}'[A distinctive name to identify the bridge]:' \
- '(-t --target)'{-t,--target}'[The target of the bridge. Valid values are [github,gitlab,launchpad-preview]]:' \
- '(-u --url)'{-u,--url}'[The URL of the target repository]:' \
- '(-o --owner)'{-o,--owner}'[The owner of the target repository]:' \
- '(-T --token)'{-T,--token}'[The authentication token for the API]:' \
- '--token-stdin[Will read the token from stdin and ignore --token]' \
- '(-p --project)'{-p,--project}'[The name of the target repository]:'
-}
-
-function _git-bug_bridge_pull {
- _arguments \
- '(-n --no-resume)'{-n,--no-resume}'[force importing all bugs]' \
- '(-s --since)'{-s,--since}'[import only bugs updated after the given date (ex: "200h" or "june 2 2019")]:'
-}
-
-function _git-bug_bridge_push {
- _arguments
-}
-
-function _git-bug_bridge_rm {
- _arguments
-}
-
-function _git-bug_bridge_token {
+function _git-bug_bridge_auth {
local -a commands
_arguments -C \
@@ -179,37 +154,62 @@ function _git-bug_bridge_token {
case $state in
cmnds)
commands=(
- "add:Store a new token"
- "rm:Remove a token."
- "show:Display a token."
+ "add-token:Store a new token"
+ "rm:Remove a credential."
+ "show:Display an authentication credential."
)
_describe "command" commands
;;
esac
case "$words[1]" in
- add)
- _git-bug_bridge_token_add
+ add-token)
+ _git-bug_bridge_auth_add-token
;;
rm)
- _git-bug_bridge_token_rm
+ _git-bug_bridge_auth_rm
;;
show)
- _git-bug_bridge_token_show
+ _git-bug_bridge_auth_show
;;
esac
}
-function _git-bug_bridge_token_add {
+function _git-bug_bridge_auth_add-token {
_arguments \
'(-t --target)'{-t,--target}'[The target of the bridge. Valid values are [github,gitlab,launchpad-preview]]:'
}
-function _git-bug_bridge_token_rm {
+function _git-bug_bridge_auth_rm {
+ _arguments
+}
+
+function _git-bug_bridge_auth_show {
+ _arguments
+}
+
+function _git-bug_bridge_configure {
+ _arguments \
+ '(-n --name)'{-n,--name}'[A distinctive name to identify the bridge]:' \
+ '(-t --target)'{-t,--target}'[The target of the bridge. Valid values are [github,gitlab,launchpad-preview]]:' \
+ '(-u --url)'{-u,--url}'[The URL of the target repository]:' \
+ '(-o --owner)'{-o,--owner}'[The owner of the target repository]:' \
+ '(-T --token)'{-T,--token}'[The authentication token for the API]:' \
+ '--token-stdin[Will read the token from stdin and ignore --token]' \
+ '(-p --project)'{-p,--project}'[The name of the target repository]:'
+}
+
+function _git-bug_bridge_pull {
+ _arguments \
+ '(-n --no-resume)'{-n,--no-resume}'[force importing all bugs]' \
+ '(-s --since)'{-s,--since}'[import only bugs updated after the given date (ex: "200h" or "june 2 2019")]:'
+}
+
+function _git-bug_bridge_push {
_arguments
}
-function _git-bug_bridge_token_show {
+function _git-bug_bridge_rm {
_arguments
}