mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-06 09:20:57 +01:00
expanduser for non-default config locations
This commit is contained in:
parent
f77f2a4075
commit
4ef4f7570b
1 changed files with 2 additions and 2 deletions
|
@ -184,7 +184,7 @@ DEFAULT_TITLE = '{current_job:{} | }{user}@{hostname}: {cwd} | xonsh'
|
||||||
@default_value
|
@default_value
|
||||||
def xonsh_data_dir(env):
|
def xonsh_data_dir(env):
|
||||||
"""Ensures and returns the $XONSH_DATA_DIR"""
|
"""Ensures and returns the $XONSH_DATA_DIR"""
|
||||||
xdd = os.path.join(env.get('XDG_DATA_HOME'), 'xonsh')
|
xdd = os.path.expanduser(os.path.join(env.get('XDG_DATA_HOME'), 'xonsh'))
|
||||||
os.makedirs(xdd, exist_ok=True)
|
os.makedirs(xdd, exist_ok=True)
|
||||||
return xdd
|
return xdd
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ def xonsh_data_dir(env):
|
||||||
@default_value
|
@default_value
|
||||||
def xonsh_config_dir(env):
|
def xonsh_config_dir(env):
|
||||||
"""Ensures and returns the $XONSH_CONFIG_DIR"""
|
"""Ensures and returns the $XONSH_CONFIG_DIR"""
|
||||||
xcd = os.path.join(env.get('XDG_CONFIG_HOME'), 'xonsh')
|
xcd = os.path.expanduser(os.path.join(env.get('XDG_CONFIG_HOME'), 'xonsh'))
|
||||||
os.makedirs(xcd, exist_ok=True)
|
os.makedirs(xcd, exist_ok=True)
|
||||||
return xcd
|
return xcd
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue