aboutsummaryrefslogtreecommitdiffstats
path: root/misc/completion/powershell
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2022-08-23 15:02:41 +0200
committerMichael Muré <batolettre@gmail.com>2022-08-23 15:09:31 +0200
commit8d11e620a3d663cf21a62910d0f3961a8aff4be1 (patch)
tree17dc3df82229eea5c3500e2bd8448060dc1ae849 /misc/completion/powershell
parent5a70e8b3a2e0fe3d1a1dcd4c24bb6bf64633cb7f (diff)
downloadgit-bug-8d11e620a3d663cf21a62910d0f3961a8aff4be1.tar.gz
webui: add a flag to log handling errors
Diffstat (limited to 'misc/completion/powershell')
-rw-r--r--misc/completion/powershell/git-bug5
1 files changed, 4 insertions, 1 deletions
diff --git a/misc/completion/powershell/git-bug b/misc/completion/powershell/git-bug
index b8280eea..1b3e99d0 100644
--- a/misc/completion/powershell/git-bug
+++ b/misc/completion/powershell/git-bug
@@ -44,6 +44,7 @@ Register-ArgumentCompleter -CommandName 'git-bug' -ScriptBlock {
# Prepare the command to request completions for the program.
# Split the command at the first space to separate the program and arguments.
$Program,$Arguments = $Command.Split(" ",2)
+
$RequestComp="$Program __completeNoDesc $Arguments"
__git-bug_debug "RequestComp: $RequestComp"
@@ -73,11 +74,13 @@ Register-ArgumentCompleter -CommandName 'git-bug' -ScriptBlock {
}
__git-bug_debug "Calling $RequestComp"
+ # First disable ActiveHelp which is not supported for Powershell
+ $env:GIT_BUG_ACTIVE_HELP=0
+
#call the command store the output in $out and redirect stderr and stdout to null
# $Out is an array contains each line per element
Invoke-Expression -OutVariable out "$RequestComp" 2>&1 | Out-Null
-
# get directive from last line
[int]$Directive = $Out[-1].TrimStart(':')
if ($Directive -eq "") {