Skip to content

Commit 87f4dd2

Browse files
committed
cli: attach-session
1 parent d6b3d46 commit 87f4dd2

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

tmuxp/cli.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -348,25 +348,24 @@ def complete(cline, cpoint):
348348
def session_complete(command, commands, ctext):
349349
if ctext.startswith(command + ' '):
350350
commands[:] = []
351-
ctext_attach = ctext.replace(command + ' ', '')
351+
ctext_subargs = ctext.replace(command + ' ', '')
352352

353353
sessions = [s.get('session_name') for s in t._sessions]
354-
#commands.extend([c for c in sessions if ctext_attach in c])
354+
commands.extend([c for c in sessions if ctext_subargs in c])
355355

356356
#commands = [c for c in commands if ctext_subcommand_args in c]
357-
commands = [c for c in commands if c.startswith(ctext_attach)]
357+
#commands = [c for c in commands if c.startswith(ctext_subargs)]
358358

359359
def config_complete(command, commands, ctext):
360360
if ctext.startswith(command + ' '):
361361
commands[:] = []
362-
ctext_subcommand_args = ctext.replace(command + ' ', '')
362+
ctext_subargs = ctext.replace(command + ' ', '')
363363
configs = []
364364
configs += config.in_cwd()
365365
configs += config.in_dir(config_dir)
366-
#commands = [c for c in commands if ctext_subcommand_args in c]
367-
commands += [c for c in configs if c.startswith(ctext_subcommand_args)]
366+
commands += [c for c in configs if c.startswith(ctext_subargs)]
368367

369-
session_complete('attach', commands, ctext)
368+
session_complete('attach-session', commands, ctext)
370369
session_complete('kill-session', commands, ctext)
371370
config_complete('load', commands, ctext)
372371

0 commit comments

Comments
 (0)