aboutsummaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-02-15 02:55:19 +0100
committerMichael Muré <batolettre@gmail.com>2020-02-15 02:55:19 +0100
commitfe3d5c95e4be5874066402b5463ada34894c7f01 (patch)
tree29f04fae0dc3d5d4883d4989012c26109ba754dc /misc
parent2df72942f2b057956c7873f908b64880ab647331 (diff)
downloadgit-bug-fe3d5c95e4be5874066402b5463ada34894c7f01.tar.gz
bridges: massive refactor
- automatic flag validation and warning - generalized prompt - cleanups
Diffstat (limited to 'misc')
-rw-r--r--misc/bash_completion/git-bug12
-rw-r--r--misc/powershell_completion/git-bug24
-rw-r--r--misc/zsh_completion/git-bug13
3 files changed, 28 insertions, 21 deletions
diff --git a/misc/bash_completion/git-bug b/misc/bash_completion/git-bug
index a062bfe8..ef6847c8 100644
--- a/misc/bash_completion/git-bug
+++ b/misc/bash_completion/git-bug
@@ -412,10 +412,10 @@ _git-bug_bridge_configure()
two_word_flags+=("--base-url")
two_word_flags+=("-b")
local_nonpersistent_flags+=("--base-url=")
- flags+=("--owner=")
- two_word_flags+=("--owner")
- two_word_flags+=("-o")
- local_nonpersistent_flags+=("--owner=")
+ flags+=("--login=")
+ two_word_flags+=("--login")
+ two_word_flags+=("-l")
+ local_nonpersistent_flags+=("--login=")
flags+=("--credential=")
two_word_flags+=("--credential")
two_word_flags+=("-c")
@@ -425,6 +425,10 @@ _git-bug_bridge_configure()
local_nonpersistent_flags+=("--token=")
flags+=("--token-stdin")
local_nonpersistent_flags+=("--token-stdin")
+ flags+=("--owner=")
+ two_word_flags+=("--owner")
+ two_word_flags+=("-o")
+ local_nonpersistent_flags+=("--owner=")
flags+=("--project=")
two_word_flags+=("--project")
two_word_flags+=("-p")
diff --git a/misc/powershell_completion/git-bug b/misc/powershell_completion/git-bug
index b15e6398..54f7b7d0 100644
--- a/misc/powershell_completion/git-bug
+++ b/misc/powershell_completion/git-bug
@@ -81,18 +81,20 @@ Register-ArgumentCompleter -Native -CommandName 'git-bug' -ScriptBlock {
[CompletionResult]::new('--name', 'name', [CompletionResultType]::ParameterName, 'A distinctive name to identify the bridge')
[CompletionResult]::new('-t', 't', [CompletionResultType]::ParameterName, 'The target of the bridge. Valid values are [github,gitlab,launchpad-preview]')
[CompletionResult]::new('--target', 'target', [CompletionResultType]::ParameterName, 'The target of the bridge. Valid values are [github,gitlab,launchpad-preview]')
- [CompletionResult]::new('-u', 'u', [CompletionResultType]::ParameterName, 'The URL of the target repository')
- [CompletionResult]::new('--url', 'url', [CompletionResultType]::ParameterName, 'The URL of the target repository')
- [CompletionResult]::new('-b', 'b', [CompletionResultType]::ParameterName, 'The base URL of your issue tracker service')
- [CompletionResult]::new('--base-url', 'base-url', [CompletionResultType]::ParameterName, 'The base URL of your issue tracker service')
- [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('-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('-u', 'u', [CompletionResultType]::ParameterName, 'The URL of the remote repository')
+ [CompletionResult]::new('--url', 'url', [CompletionResultType]::ParameterName, 'The URL of the remote repository')
+ [CompletionResult]::new('-b', 'b', [CompletionResultType]::ParameterName, 'The base URL of your remote issue tracker')
+ [CompletionResult]::new('--base-url', 'base-url', [CompletionResultType]::ParameterName, 'The base URL of your remote issue tracker')
+ [CompletionResult]::new('-l', 'l', [CompletionResultType]::ParameterName, 'The login on your remote issue tracker')
+ [CompletionResult]::new('--login', 'login', [CompletionResultType]::ParameterName, 'The login on your remote issue tracker')
+ [CompletionResult]::new('-c', 'c', [CompletionResultType]::ParameterName, 'The identifier or prefix of an already known credential for your remote issue tracker (see "git-bug bridge auth")')
+ [CompletionResult]::new('--credential', 'credential', [CompletionResultType]::ParameterName, 'The identifier or prefix of an already known credential for your remote issue tracker (see "git-bug bridge auth")')
+ [CompletionResult]::new('--token', 'token', [CompletionResultType]::ParameterName, 'A raw authentication token for the remote issue tracker')
[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')
+ [CompletionResult]::new('-o', 'o', [CompletionResultType]::ParameterName, 'The owner of the remote repository')
+ [CompletionResult]::new('--owner', 'owner', [CompletionResultType]::ParameterName, 'The owner of the remote repository')
+ [CompletionResult]::new('-p', 'p', [CompletionResultType]::ParameterName, 'The name of the remote repository')
+ [CompletionResult]::new('--project', 'project', [CompletionResultType]::ParameterName, 'The name of the remote repository')
break
}
'git-bug;bridge;pull' {
diff --git a/misc/zsh_completion/git-bug b/misc/zsh_completion/git-bug
index f6d50e08..edfff683 100644
--- a/misc/zsh_completion/git-bug
+++ b/misc/zsh_completion/git-bug
@@ -194,13 +194,14 @@ 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]:' \
- '(-b --base-url)'{-b,--base-url}'[The base URL of your issue tracker service]:' \
- '(-o --owner)'{-o,--owner}'[The owner of the target repository]:' \
- '(-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]:' \
+ '(-u --url)'{-u,--url}'[The URL of the remote repository]:' \
+ '(-b --base-url)'{-b,--base-url}'[The base URL of your remote issue tracker]:' \
+ '(-l --login)'{-l,--login}'[The login on your remote issue tracker]:' \
+ '(-c --credential)'{-c,--credential}'[The identifier or prefix of an already known credential for your remote issue tracker (see "git-bug bridge auth")]:' \
+ '--token[A raw authentication token for the remote issue tracker]:' \
'--token-stdin[Will read the token from stdin and ignore --token]' \
- '(-p --project)'{-p,--project}'[The name of the target repository]:'
+ '(-o --owner)'{-o,--owner}'[The owner of the remote repository]:' \
+ '(-p --project)'{-p,--project}'[The name of the remote repository]:'
}
function _git-bug_bridge_pull {