diff options
author | Michael Muré <batolettre@gmail.com> | 2022-08-23 15:02:41 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2022-08-23 15:09:31 +0200 |
commit | 8d11e620a3d663cf21a62910d0f3961a8aff4be1 (patch) | |
tree | 17dc3df82229eea5c3500e2bd8448060dc1ae849 /misc/completion/powershell | |
parent | 5a70e8b3a2e0fe3d1a1dcd4c24bb6bf64633cb7f (diff) | |
download | git-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-bug | 5 |
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 "") { |