Skip to content

Commit bb60395

Browse files
committed
!squash more
1 parent 851a632 commit bb60395

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

tmuxp/cli/load.py

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -463,30 +463,17 @@ def config_shell_complete(ctx, params, incomplete):
463463
# CWD Paths
464464
# CWD + Parents
465465
choices += [
466-
os.path.relpath(p, pathlib.Path.cwd())
467-
# p.relative_to(pathlib.Path.cwd())
466+
pathlib.Path(os.path.relpath(p, pathlib.Path.cwd()))
468467
for p in [pathlib.Path.cwd(), *pathlib.Path.cwd().parents]
469468
if config.in_dir(str(p)) or len(list(p.glob(".tmuxp.*")))
470-
# or len(list(concat(p.glob(".tmuxp.*"), p.glob("*/.tmuxp.*"))))
471-
# if scan_config(config=p, config_dir=config_dir, raises=False)
472469
]
473470
# CWD look one directory up
474471
choices += [
475-
f"./{os.path.relpath(p, pathlib.Path.cwd())}"
476-
# p.relative_to(pathlib.Path.cwd())
472+
pathlib.Path(f"./{os.path.relpath(p, pathlib.Path.cwd())}")
477473
for p in pathlib.Path.cwd().glob("*/.tmuxp.*")
478-
# or len(list(concat(p.glob(".tmuxp.*"), p.glob("*/.tmuxp.*"))))
479-
# if scan_config(config=p, config_dir=config_dir, raises=False)
480474
]
481475

482-
### str
483-
choices = [str(p) for p in choices]
484-
return [CompletionItem(choice) for choice in choices]
485-
486-
return [
487-
CompletionItem(choice) for choice in choices if choice.startswith(incomplete)
488-
]
489-
return [CompletionItem(choice) for choice in choices if incomplete in choice]
476+
return [str(c) for c in choices]
490477

491478

492479
@click.command(name="load", short_help="Load tmuxp workspaces.")

0 commit comments

Comments
 (0)