Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ def test_tmuxp_configdir_env_var(tmpdir, monkeypatch):
assert get_config_dir() == tmpdir


def test_tmuxp_configdir_xdg_config_dir(tmpdir, monkeypatch):
monkeypatch.setenv('XDG_CONFIG_HOME', str(tmpdir))
tmux_dir = tmpdir.mkdir("tmuxp")

assert get_config_dir() == str(tmux_dir)


def test_resolve_dot(tmpdir, homedir, configdir, projectdir, monkeypatch):
monkeypatch.setenv('HOME', str(homedir))
projectdir.join('.tmuxp.yaml').ensure()
Expand Down
2 changes: 1 addition & 1 deletion tmuxp/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def get_config_dir():
if 'TMUXP_CONFIGDIR' in os.environ:
paths.append(os.environ['TMUXP_CONFIGDIR'])
if 'XDG_CONFIG_HOME' in os.environ:
paths.append(os.environ['XDG_CONFIG_HOME'])
paths.append(os.path.join(os.environ['XDG_CONFIG_HOME'], 'tmuxp'))
else:
paths.append('~/.config/tmuxp/')
paths.append('~/.tmuxp')
Expand Down