Skip to content

Commit b7ff339

Browse files
committed
feat(freeze): tmuxp freeze <tab>
1 parent 33d5937 commit b7ff339

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tmuxp/cli/freeze.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,16 @@
1212
from .utils import _validate_choices, get_abs_path, get_config_dir
1313

1414

15+
def session_completion(ctx, params, incomplete):
16+
t = Server()
17+
choices = [session.name for session in t.list_sessions()]
18+
return sorted([str(c) for c in choices if str(c).startswith(incomplete)])
19+
20+
1521
@click.command(name="freeze")
16-
@click.argument("session_name", nargs=1, required=False)
22+
@click.argument(
23+
"session_name", nargs=1, required=False, shell_complete=session_completion
24+
)
1725
@click.option("-S", "socket_path", help="pass-through for tmux -S")
1826
@click.option("-L", "socket_name", help="pass-through for tmux -L")
1927
@click.option(

0 commit comments

Comments
 (0)