mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-09-11 22:47:45 +03:00
Expand environment variables in config file include directives
This commit is contained in:
parent
b9fa8dbe42
commit
e07d216a11
@ -48,7 +48,7 @@ def parse_line(line, type_map, special_handling, ans, all_keys, base_path_for_in
|
||||
if special_handling(key, val, ans):
|
||||
return
|
||||
if key == 'include':
|
||||
val = val.strip()
|
||||
val = os.path.expandvars(os.path.expanduser(val.strip()))
|
||||
if not os.path.isabs(val):
|
||||
val = os.path.join(base_path_for_includes, val)
|
||||
try:
|
||||
|
@ -2,7 +2,9 @@
|
||||
|
||||
# You can include secondary config files via the "include" directive.
|
||||
# If you use a relative path for include, it is resolved with respect to the
|
||||
# location of the current config file. For example:
|
||||
# location of the current config file. Note that environment variables
|
||||
# are expanded, so ${USER}.conf becomes name.conf if USER=name
|
||||
# For example:
|
||||
# include other.conf
|
||||
|
||||
# Fonts {{{
|
||||
|
Loading…
Reference in New Issue
Block a user