From 5953c2097dc6224a6cc1efe527b2adef5429cc7c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 13 Apr 2019 13:53:32 +0530 Subject: [PATCH] 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 --- kitty/conf/utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kitty/conf/utils.py b/kitty/conf/utils.py index b4e4c68ea..f7838fb57 100644 --- a/kitty/conf/utils.py +++ b/kitty/conf/utils.py @@ -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):