From dd2f46af80d614e3305847845c2a4a4b7447017c Mon Sep 17 00:00:00 2001 From: Fred Yeadon Date: Fri, 26 Nov 2021 15:52:28 -0600 Subject: [PATCH] Add support for powershell (#798) --- autoload/tagbar.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index dd391b9..e8f9dc6 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -2992,7 +2992,7 @@ function! s:EscapeCtagsCmd(ctags_bin, args, ...) abort "Set up 0th argument of ctags_cmd "a:ctags_bin may have special characters that require escaping. - if &shell =~? 'cmd\.exe$' && a:ctags_bin !~# '\s' + if (&shell =~? 'cmd\.exe$' || &shell =~? 'powershell\.exe$' || &shell =~? 'powershell$' || &shell =~? 'pwsh\.exe$' || &shell =~? 'pwsh$') && a:ctags_bin !~# '\s' "For windows cmd.exe, escaping the 0th argument can cause "problems if it references a batch file and the batch file uses %~dp0. "So for windows cmd.exe, only escape the 0th argument iff necessary.