[vim/vim] fix: wildcards in expanded env vars reinterpreted by glob (PR #20053)

2 views
Skip to first unread message

glepnir

unread,
Apr 23, 2026, 11:48:15 PM (13 hours ago) Apr 23
to vim/vim, Subscribed

Problem: With $d='[dir]', :e $d/file.txt opens the wrong file, :e $d/<Tab> fails to complete, and glob('$d/*') returns nothing. Wildcard characters inside expanded environment variables get picked up by globbing again.

Solution: Turn the 4th parameter of expand_env_esc() from a bool into a string of characters to escape in each expanded value. Callers that pass the result to wildcard expansion should include PATH_ESC_WILDCARDS in addition to " \t".

Related neovim/neovim#31334


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/20053

Commit Summary

  • 84bec1b fix: wildcards in expanded env vars reinterpreted by glob

File Changes

(7 files)

Patch Links:


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/pull/20053@github.com>

Reply all
Reply to author
Forward
0 new messages