From acc9a6f3a6df2961c3ae44352216d915cb9b5315 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Sat, 10 Sep 2022 11:09:19 +0200 Subject: commands: reorg into different packages --- misc/completion/bash/git-bug | 2 +- misc/completion/powershell/git-bug | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'misc') diff --git a/misc/completion/bash/git-bug b/misc/completion/bash/git-bug index 2bca660b..81eb0d3c 100644 --- a/misc/completion/bash/git-bug +++ b/misc/completion/bash/git-bug @@ -128,7 +128,7 @@ __git-bug_process_completion_results() { __git-bug_handle_special_char "$cur" = # Print the activeHelp statements before we finish - if [ ${#activeHelp} -ne 0 ]; then + if [ ${#activeHelp[*]} -ne 0 ]; then printf "\n"; printf "%s\n" "${activeHelp[@]}" printf "\n" diff --git a/misc/completion/powershell/git-bug b/misc/completion/powershell/git-bug index 1b3e99d0..424ad8ac 100644 --- a/misc/completion/powershell/git-bug +++ b/misc/completion/powershell/git-bug @@ -10,7 +10,7 @@ filter __git-bug_escapeStringWithSpecialChars { $_ -replace '\s|#|@|\$|;|,|''|\{|\}|\(|\)|"|`|\||<|>|&','`$&' } -Register-ArgumentCompleter -CommandName 'git-bug' -ScriptBlock { +[scriptblock]$__git_bugCompleterBlock = { param( $WordToComplete, $CommandAst, @@ -226,3 +226,5 @@ Register-ArgumentCompleter -CommandName 'git-bug' -ScriptBlock { } } + +Register-ArgumentCompleter -CommandName 'git-bug' -ScriptBlock $__git_bugCompleterBlock -- cgit