Skip to content

Commit

Permalink
Fix pwsh/powershell test when used with a parameters
Browse files Browse the repository at this point in the history
Like `set shell=pwsh\ -NoLogo`.
  • Loading branch information
acelya authored and airblade committed Feb 11, 2021
1 parent d249be7 commit 2e3cd54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/gitgutter/utility.vim
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function! s:use_known_shell() abort
let &shell = 'sh'
set shellcmdflag=-c shellredir=>%s\ 2>&1
endif
if has('win32') && (&shell ==# 'pwsh' || &shell ==# 'powershell')
if has('win32') && (&shell =~# 'pwsh' || &shell =~# 'powershell')
let [s:shell, s:shellcmdflag, s:shellredir, s:shellpipe, s:shellquote, s:shellxquote] = [&shell, &shellcmdflag, &shellredir, &shellpipe, &shellquote, &shellxquote]
let &shell = 'cmd.exe'
set shellcmdflag=/s\ /c shellredir=>%s\ 2>&1 shellpipe=>%s\ 2>&1 shellquote= shellxquote="
Expand Down

0 comments on commit 2e3cd54

Please sign in to comment.