From e511f3d885e5e7f15d3b7f8e500380f0c63bc377 Mon Sep 17 00:00:00 2001 From: Amine Hilaly Date: Sat, 22 Jun 2019 13:40:17 +0200 Subject: [misc] update man docs and completion scripts [cache] BugCache: Fix set metadata raw [bridge/github] Fix graphql input objects --- misc/bash_completion/git-bug | 21 +++++++++++++++++++ misc/zsh_completion/git-bug | 49 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) (limited to 'misc') diff --git a/misc/bash_completion/git-bug b/misc/bash_completion/git-bug index 741dcc49..ae3242e5 100644 --- a/misc/bash_completion/git-bug +++ b/misc/bash_completion/git-bug @@ -351,6 +351,26 @@ _git-bug_bridge_pull() noun_aliases=() } +_git-bug_bridge_push() +{ + last_command="git-bug_bridge_push" + + command_aliases=() + + commands=() + + flags=() + two_word_flags=() + local_nonpersistent_flags=() + flags_with_completion=() + flags_completion=() + + + must_have_one_flag=() + must_have_one_noun=() + noun_aliases=() +} + _git-bug_bridge_rm() { last_command="git-bug_bridge_rm" @@ -380,6 +400,7 @@ _git-bug_bridge() commands=() commands+=("configure") commands+=("pull") + commands+=("push") commands+=("rm") flags=() diff --git a/misc/zsh_completion/git-bug b/misc/zsh_completion/git-bug index ed676724..97fb27c5 100644 --- a/misc/zsh_completion/git-bug +++ b/misc/zsh_completion/git-bug @@ -1,3 +1,4 @@ +<<<<<<< HEAD #compdef _git-bug git-bug @@ -394,3 +395,51 @@ function _git-bug_webui { '(-p --port)'{-p,--port}'[Port to listen to (default is random)]:' } +======= +#compdef git-bug + +_arguments \ + '1: :->level1' \ + '2: :->level2' \ + '3: :_files' +case $state in + level1) + case $words[1] in + git-bug) + _arguments '1: :(add bridge commands comment deselect label ls ls-id ls-label pull push select show status termui title user version webui)' + ;; + *) + _arguments '*: :_files' + ;; + esac + ;; + level2) + case $words[2] in + bridge) + _arguments '2: :(configure pull push rm)' + ;; + comment) + _arguments '2: :(add)' + ;; + label) + _arguments '2: :(add rm)' + ;; + status) + _arguments '2: :(close open)' + ;; + title) + _arguments '2: :(edit)' + ;; + user) + _arguments '2: :(adopt create ls)' + ;; + *) + _arguments '*: :_files' + ;; + esac + ;; + *) + _arguments '*: :_files' + ;; +esac +>>>>>>> 3daac46... update man docs and completion scripts -- cgit From 9b4b1fc09a9fca1aeb48560a258de8990070b3b5 Mon Sep 17 00:00:00 2001 From: Amine Hilaly Date: Sun, 23 Jun 2019 14:50:15 +0200 Subject: Rebase and add bridge push zsh & powershell completion --- misc/powershell_completion/git-bug | 4 +++ misc/zsh_completion/git-bug | 57 ++++++-------------------------------- 2 files changed, 12 insertions(+), 49 deletions(-) (limited to 'misc') diff --git a/misc/powershell_completion/git-bug b/misc/powershell_completion/git-bug index 7eff1cda..b89897a3 100644 --- a/misc/powershell_completion/git-bug +++ b/misc/powershell_completion/git-bug @@ -50,6 +50,7 @@ Register-ArgumentCompleter -Native -CommandName 'git-bug' -ScriptBlock { 'git-bug;bridge' { [CompletionResult]::new('configure', 'configure', [CompletionResultType]::ParameterValue, 'Configure a new bridge.') [CompletionResult]::new('pull', 'pull', [CompletionResultType]::ParameterValue, 'Pull updates.') + [CompletionResult]::new('push', 'push', [CompletionResultType]::ParameterValue, 'Push updates.') [CompletionResult]::new('rm', 'rm', [CompletionResultType]::ParameterValue, 'Delete a configured bridge.') break } @@ -71,6 +72,9 @@ Register-ArgumentCompleter -Native -CommandName 'git-bug' -ScriptBlock { 'git-bug;bridge;pull' { break } + 'git-bug;bridge;push' { + break + } 'git-bug;bridge;rm' { break } diff --git a/misc/zsh_completion/git-bug b/misc/zsh_completion/git-bug index 97fb27c5..1e2ed511 100644 --- a/misc/zsh_completion/git-bug +++ b/misc/zsh_completion/git-bug @@ -1,4 +1,3 @@ -<<<<<<< HEAD #compdef _git-bug git-bug @@ -117,6 +116,7 @@ function _git-bug_bridge { commands=( "configure:Configure a new bridge." "pull:Pull updates." + "push:Push updates." "rm:Delete a configured bridge." ) _describe "command" commands @@ -130,6 +130,9 @@ function _git-bug_bridge { pull) _git-bug_bridge_pull ;; + push) + _git-bug_bridge_push + ;; rm) _git-bug_bridge_rm ;; @@ -150,6 +153,10 @@ function _git-bug_bridge_pull { _arguments } +function _git-bug_bridge_push { + _arguments +} + function _git-bug_bridge_rm { _arguments } @@ -395,51 +402,3 @@ function _git-bug_webui { '(-p --port)'{-p,--port}'[Port to listen to (default is random)]:' } -======= -#compdef git-bug - -_arguments \ - '1: :->level1' \ - '2: :->level2' \ - '3: :_files' -case $state in - level1) - case $words[1] in - git-bug) - _arguments '1: :(add bridge commands comment deselect label ls ls-id ls-label pull push select show status termui title user version webui)' - ;; - *) - _arguments '*: :_files' - ;; - esac - ;; - level2) - case $words[2] in - bridge) - _arguments '2: :(configure pull push rm)' - ;; - comment) - _arguments '2: :(add)' - ;; - label) - _arguments '2: :(add rm)' - ;; - status) - _arguments '2: :(close open)' - ;; - title) - _arguments '2: :(edit)' - ;; - user) - _arguments '2: :(adopt create ls)' - ;; - *) - _arguments '*: :_files' - ;; - esac - ;; - *) - _arguments '*: :_files' - ;; -esac ->>>>>>> 3daac46... update man docs and completion scripts -- cgit