|
21 | 21 | from .. import config_reader, exc, log, util
|
22 | 22 | from ..workspace import loader
|
23 | 23 | from ..workspace.builder import WorkspaceBuilder
|
24 |
| -from ..workspace.finders import find_workspace_file, get_workspace_dir, in_dir |
| 24 | +from ..workspace.finders import find_workspace_file, get_workspace_dir |
25 | 25 | from .utils import prompt_choices, prompt_yes_no, style, tmuxp_echo
|
26 | 26 |
|
27 | 27 | if t.TYPE_CHECKING:
|
@@ -468,28 +468,6 @@ def load_workspace(
|
468 | 468 | return _setup_plugins(builder)
|
469 | 469 |
|
470 | 470 |
|
471 |
| -def workspace_file_completion(ctx, params, incomplete): |
472 |
| - workspace_dir = pathlib.Path(get_workspace_dir()) |
473 |
| - choices: t.List[pathlib.Path] = [] |
474 |
| - |
475 |
| - # CWD Paths |
476 |
| - choices += sorted( |
477 |
| - pathlib.Path(os.path.relpath(p, pathlib.Path.cwd())) |
478 |
| - for p in [pathlib.Path.cwd(), *pathlib.Path.cwd().parents] |
479 |
| - if in_dir(str(p)) or len(list(p.glob(".tmuxp.*"))) |
480 |
| - ) |
481 |
| - # CWD look one directory up |
482 |
| - choices += [ |
483 |
| - pathlib.Path(f"./{os.path.relpath(p, pathlib.Path.cwd())}") |
484 |
| - for p in pathlib.Path.cwd().glob("*/.tmuxp.*") |
485 |
| - ] |
486 |
| - |
487 |
| - # Project workspace |
488 |
| - choices += sorted((workspace_dir / c).stem for c in in_dir(str(workspace_dir))) |
489 |
| - |
490 |
| - return sorted(str(c) for c in choices if str(c).startswith(incomplete)) |
491 |
| - |
492 |
| - |
493 | 471 | def create_load_subparser(parser: argparse.ArgumentParser) -> argparse.ArgumentParser:
|
494 | 472 | workspace_files = parser.add_argument(
|
495 | 473 | "workspace_files",
|
|
0 commit comments