From b92adfcb5f79f2b32c3dafb0fc3e7f1b753b6197 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Sun, 8 Dec 2019 21:15:06 +0100 Subject: bridge: huge refactor to accept multiple kind of credentials --- misc/bash_completion/git-bug | 9 ++++----- misc/powershell_completion/git-bug | 7 +++---- misc/zsh_completion/git-bug | 4 ++-- 3 files changed, 9 insertions(+), 11 deletions(-) (limited to 'misc') 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]:' } -- cgit