[vim/vim] Cannot run external commands in vim through :! (Issue #20608)

11 views
Skip to first unread message

charan

unread,
Jun 22, 2026, 1:59:23 PM (yesterday) Jun 22
to vim/vim, Subscribed
chrnz008 created an issue (vim/vim#20608)

Steps to reproduce

  1. install vim VIM - Vi IMproved 9.2 (2026 Feb 14, compiled Jun 15 2026 23:46:57)
    via winget isntall vim.vim --interactive
  2. try to run external programs like curl.exe for eg
    it reports
Screenshot.2026-06-22.232302.png (view on web)

Expected behaviour

expected program should run in an external console or gui terminal based on go-!
sidenote:
it is working fine for cmd commands like dir

Version of Vim

VIM - Vi IMproved 9.2 (2026 Feb 14, compiled Jun 15 2026 23:46:57)

Environment

Microsoft Windows [Version 10.0.26200.8655]
Wezterm
screen-256color
cmd

Logs and stack traces


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20608@github.com>

charan

unread,
Jun 22, 2026, 2:17:02 PM (yesterday) Jun 22
to vim/vim, Subscribed
chrnz008 left a comment (vim/vim#20608)

i tried downgrading the version to 9.2.649 but issue still persists probably a corrupted file, still need help


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20608/4771429895@github.com>

Christian Brabandt

unread,
Jun 22, 2026, 4:05:47 PM (yesterday) Jun 22
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#20608)

it seems curl is not in your $PATH.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20608/4772511096@github.com>

charan

unread,
Jun 22, 2026, 9:37:21 PM (yesterday) Jun 22
to vim/vim, Subscribed
chrnz008 left a comment (vim/vim#20608)
C:\Users\chr_58>echo %PATH%
;C:\Program Files\Alacritty\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Users\chr_58\AppData\Local\Microsoft\WindowsApps;C:\msys64\ucrt64\bin;C:\msys64\usr\bin;C:\Program Files\dotnet\;C:\Program Files\WezTerm;C:\Program Files\Neovim\bin;C:\Users\chr_58\.cargo\bin;C:\Users\chr_58\AppData\Local\Microsoft\WindowsApps

C:\Users\chr_58>where curl
C:\Windows\System32\curl.exe


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20608/4774813889@github.com>

charan

unread,
1:36 AM (21 hours ago) 1:36 AM
to vim/vim, Subscribed
chrnz008 left a comment (vim/vim#20608)

it is indeed a PATH issue as @chrisbra mentioned.The issue was caused by corrupted PATH entries in the Windows registry, which can be introduced by third-party installers (commonly WinGet, npm, or other package managers) when they programmatically write to the PATH.
Why :! fails in Vim but works in cmd
When a PATH entry contains a literal newline, carriage return, or leading/trailing whitespace, cmd.exe is lenient enough to partially tolerate it

  • it may skip the bad entry but continue processing the rest of the PATH, so most commands still work in a normal terminal session.
    Vim however spawns a fresh shell subprocess to run :! commands, passing the PATH through the Windows environment block. The environment block has stricter formatting requirements — a newline character in a PATH value is interpreted as a delimiter between environment variables, not within one. This effectively truncates the PATH at the point of corruption, dropping everything after it, including critical directories like C:\Windows\System32. This is why executables that exist on the system cannot be found inside Vim's :! even though they work fine in cmd.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20608/4775985142@github.com>

Reply all
Reply to author
Forward
0 new messages