mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
Expand env vars throughout command lines
When converting strings to command lines interpret env vars in all the parts of the command line not just the first item. Fixes #1535
This commit is contained in:
@@ -37,9 +37,8 @@ def to_bool(x):
|
||||
|
||||
|
||||
def to_cmdline(x):
|
||||
ans = shlex.split(x)
|
||||
ans[0] = os.path.expandvars(os.path.expanduser(ans[0]))
|
||||
return ans
|
||||
return list(map(
|
||||
lambda y: os.path.expandvars(os.path.expanduser(y)), shlex.split(x)))
|
||||
|
||||
|
||||
def python_string(text):
|
||||
|
||||
Reference in New Issue
Block a user