From 77e60aceeac60e02c253a24faba9603c76228e76 Mon Sep 17 00:00:00 2001 From: Amine Hilaly Date: Sat, 24 Aug 2019 13:11:58 +0200 Subject: [PATCH] commands: add bridge configure completion scripts --- doc/man/git-bug-bridge-configure.1 | 4 ++++ doc/md/git-bug_bridge_configure.md | 1 + misc/bash_completion/git-bug | 2 ++ misc/powershell_completion/git-bug | 1 + misc/zsh_completion/git-bug | 1 + 5 files changed, 9 insertions(+) diff --git a/doc/man/git-bug-bridge-configure.1 b/doc/man/git-bug-bridge-configure.1 index 5e103468a467ccbb269dc98a26d63687ef0481eb..00f57dfbf60d3374f952a69ee5ccafb956a92ada 100644 --- a/doc/man/git-bug-bridge-configure.1 +++ b/doc/man/git-bug-bridge-configure.1 @@ -47,6 +47,10 @@ Token configuration can be directly passed with the \-\-token flag or in the ter \fB\-T\fP, \fB\-\-token\fP="" The authentication token for the API +.PP +\fB\-\-token\-stdin\fP[=false] + Will read the token from stdin and ignore \-\-token + .PP \fB\-p\fP, \fB\-\-project\fP="" The name of the target repository diff --git a/doc/md/git-bug_bridge_configure.md b/doc/md/git-bug_bridge_configure.md index 0f6a10ebd558b06dbbb5eb366018aa072d142468..5181cd4320961d8eede1ac948e991cbb7e5ad152 100644 --- a/doc/md/git-bug_bridge_configure.md +++ b/doc/md/git-bug_bridge_configure.md @@ -68,6 +68,7 @@ git bug bridge configure \ -u, --url string The URL of the target repository -o, --owner string The owner of the target repository -T, --token string The authentication token for the API + --token-stdin Will read the token from stdin and ignore --token -p, --project string The name of the target repository -h, --help help for configure ``` diff --git a/misc/bash_completion/git-bug b/misc/bash_completion/git-bug index 06032f1002d45757bc5ebc94bce2210e8cea2c3b..bbeb633516682d6184670895716a016f3204dbca 100644 --- a/misc/bash_completion/git-bug +++ b/misc/bash_completion/git-bug @@ -321,6 +321,8 @@ _git-bug_bridge_configure() two_word_flags+=("--token") two_word_flags+=("-T") local_nonpersistent_flags+=("--token=") + flags+=("--token-stdin") + local_nonpersistent_flags+=("--token-stdin") 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 3785c0ad2d2ef040f235e31416849cc2ad13b804..9e0805f36d53eae504c012f0ea1a8ca8da3572e6 100644 --- a/misc/powershell_completion/git-bug +++ b/misc/powershell_completion/git-bug @@ -65,6 +65,7 @@ Register-ArgumentCompleter -Native -CommandName 'git-bug' -ScriptBlock { [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('--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') break diff --git a/misc/zsh_completion/git-bug b/misc/zsh_completion/git-bug index fe1ca5a56998a7f4f3d22813f6793f8f636348cc..8eaaf694583139817f30841bb81bb1024f488b8d 100644 --- a/misc/zsh_completion/git-bug +++ b/misc/zsh_completion/git-bug @@ -146,6 +146,7 @@ function _git-bug_bridge_configure { '(-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]:' }