Skip to content

Commit 1a9f8b8

Browse files
authored
Support for loading configs with periods in directories (#637)
* Support for loading configs with periods in directories Fixes #212 #201 * Update CHANGES for supporting directories with periods
1 parent 5c716c4 commit 1a9f8b8

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

CHANGES

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ Here you can find the recent changes to tmuxp
77
current
88
-------
99
- *Insert changes/features/fixes for next release here*
10+
- :issue:`637` Support for loading directories with periods in it
11+
12+
``tmuxp load ~/work/your.project`` will now work
13+
14+
Earlier workaround was to do ``tmuxp load ~/work/your.project/.tmuxp.yaml``
15+
16+
Fixes :issue:`212` and :issue:`201`
1017

1118
tmuxp 1.5.6 (2020-10-12)
1219
------------------------

tmuxp/cli.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,8 @@ def scan_config(config, config_dir=None):
308308
is_name = False
309309
file_error = None
310310

311+
print('scan_config', config)
312+
311313
config = os.path.expanduser(config)
312314
# if purename, resolve to confg dir
313315
if is_pure_name(config):
@@ -322,7 +324,7 @@ def scan_config(config, config_dir=None):
322324
config = normpath(join(cwd, config))
323325

324326
# no extension, scan
325-
if not splitext(config)[1]:
327+
if path.isdir(config) or not splitext(config)[1]:
326328
if is_name:
327329
candidates = [
328330
x
@@ -831,6 +833,8 @@ def command_load(
831833
load_workspace(cfg, **opt)
832834

833835
# todo: obey the -d in the cli args only if user specifies
836+
print(config)
837+
print(config[-1])
834838
load_workspace(config[-1], **tmux_options)
835839

836840

0 commit comments

Comments
 (0)