Groups
Groups
Sign in
Groups
Groups
vim_dev
Conversations
About
Send feedback
Help
Commit: runtime(vim9): Reset pwsh and powershell in Open()
0 views
Skip to first unread message
Christian Brabandt
unread,
2:00 PM (7 hours ago)
2:00 PM
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vim...@googlegroups.com
runtime(vim9): Reset pwsh and powershell in Open()
Commit:
https://github.com/vim/vim/commit/3255b8a556d6f740a7acd577b8f0fc541c9fed3d
Author: Mao-Yining <
101858210+...@users.noreply.github.com
>
Date: Sun Dec 21 18:45:26 2025 +0000
runtime(vim9): Reset pwsh and powershell in Open()
relates:
https://github.com/vim/vim/issues/17995
closes:
https://github.com/vim/vim/issues/18986
Signed-off-by: Mao-Yining <
mao.y...@outlook.com
>
Signed-off-by: Christian Brabandt <
c...@256bit.org
>
diff --git a/runtime/autoload/dist/vim9.vim b/runtime/autoload/dist/vim9.vim
index a878c877c..c02280035 100644
--- a/runtime/autoload/dist/vim9.vim
+++ b/runtime/autoload/dist/vim9.vim
@@ -126,6 +126,11 @@ export def Open(file: string)
&shellslash = false
defer setbufvar('%', '&shellslash', true)
endif
+ if &shell == 'pwsh' || &shell == 'powershell'
+ const shell = &shell
+ setlocal shell&
+ defer setbufvar('%', '&shell', shell)
+ endif
Launch($"{Viewer()} {shellescape(file, 1)}")
enddef
Reply all
Reply to author
Forward
0 new messages