aboutsummaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-12-08 21:15:06 +0100
committerMichael Muré <batolettre@gmail.com>2019-12-08 21:28:27 +0100
commitb92adfcb5f79f2b32c3dafb0fc3e7f1b753b6197 (patch)
tree69202c4021b10f3ab7b7f5ebf229d501e95c4786 /misc
parent981a4a848b1329da1a73270e27633911f9298bb1 (diff)
downloadgit-bug-b92adfcb5f79f2b32c3dafb0fc3e7f1b753b6197.tar.gz
bridge: huge refactor to accept multiple kind of credentials
Diffstat (limited to 'misc')
-rw-r--r--misc/bash_completion/git-bug9
-rw-r--r--misc/powershell_completion/git-bug7
-rw-r--r--misc/zsh_completion/git-bug4
3 files changed, 9 insertions, 11 deletions
diff --git a/misc/bash_completion/git-bug b/misc/bash_completion/git-bug
index 8b850201..707369c5 100644
--- a/misc/bash_completion/git-bug
+++ b/misc/bash_completion/git-bug
@@ -404,14 +404,13 @@ _git-bug_bridge_configure()
two_word_flags+=("--owner")
two_word_flags+=("-o")
local_nonpersistent_flags+=("--owner=")
+ flags+=("--credential=")
+ two_word_flags+=("--credential")
+ two_word_flags+=("-c")
+ local_nonpersistent_flags+=("--credential=")
flags+=("--token=")
two_word_flags+=("--token")
- two_word_flags+=("-T")
local_nonpersistent_flags+=("--token=")
- flags+=("--token-id=")
- two_word_flags+=("--token-id")
- two_word_flags+=("-i")
- local_nonpersistent_flags+=("--token-id=")
flags+=("--token-stdin")
local_nonpersistent_flags+=("--token-stdin")
flags+=("--project=")
diff --git a/misc/powershell_completion/git-bug b/misc/powershell_completion/git-bug
index bdf08f42..b6086f27 100644
--- a/misc/powershell_completion/git-bug
+++ b/misc/powershell_completion/git-bug
@@ -81,10 +81,9 @@ Register-ArgumentCompleter -Native -CommandName 'git-bug' -ScriptBlock {
[CompletionResult]::new('--url', 'url', [CompletionResultType]::ParameterName, 'The URL of the target repository')
[CompletionResult]::new('-o', 'o', [CompletionResultType]::ParameterName, 'The owner of the target repository')
[CompletionResult]::new('--owner', 'owner', [CompletionResultType]::ParameterName, 'The owner of the target repository')
- [CompletionResult]::new('-T', 'T', [CompletionResultType]::ParameterName, 'The authentication token for the API')
- [CompletionResult]::new('--token', 'token', [CompletionResultType]::ParameterName, 'The authentication token for the API')
- [CompletionResult]::new('-i', 'i', [CompletionResultType]::ParameterName, 'The authentication token identifier for the API')
- [CompletionResult]::new('--token-id', 'token-id', [CompletionResultType]::ParameterName, 'The authentication token identifier for the API')
+ [CompletionResult]::new('-c', 'c', [CompletionResultType]::ParameterName, 'The identifier or prefix of an already known credential for the API (see "git-bug bridge auth")')
+ [CompletionResult]::new('--credential', 'credential', [CompletionResultType]::ParameterName, 'The identifier or prefix of an already known credential for the API (see "git-bug bridge auth")')
+ [CompletionResult]::new('--token', 'token', [CompletionResultType]::ParameterName, 'A raw authentication token for the API')
[CompletionResult]::new('--token-stdin', 'token-stdin', [CompletionResultType]::ParameterName, 'Will read the token from stdin and ignore --token')
[CompletionResult]::new('-p', 'p', [CompletionResultType]::ParameterName, 'The name of the target repository')
[CompletionResult]::new('--project', 'project', [CompletionResultType]::ParameterName, 'The name of the target repository')
diff --git a/misc/zsh_completion/git-bug b/misc/zsh_completion/git-bug
index 7a4580c0..a0b4840b 100644
--- a/misc/zsh_completion/git-bug
+++ b/misc/zsh_completion/git-bug
@@ -194,8 +194,8 @@ function _git-bug_bridge_configure {
'(-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]:' \
- '(-i --token-id)'{-i,--token-id}'[The authentication token identifier for the API]:' \
+ '(-c --credential)'{-c,--credential}'[The identifier or prefix of an already known credential for the API (see "git-bug bridge auth")]:' \
+ '--token[A raw 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]:'
}