tmux-python / tmux-python/tmuxp
tmuxp TMUX= behaviour inconsistent with tmux
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 248
- Avg merge
- 2h 13m
- Merged PRs (30d)
- 1
Description
Launching/attaching tmux via TMUX= tmuxp load ... prompts the user about attaching if the target session already exists, is already running. Attach? [Y/n]:. When attachment is confirmed, it complains with the below traceback, whereas env -u TMUX tmuxp load ... is successful.
For tmux, TMUX= tmux attach attaches successfully.
Traceback:
Traceback (most recent call last):
File "/nix/store/ck0c5r9lzb05ly2z4d9gbjkd7gdyqgpz-tmuxp-1.5.4/bin/.tmuxp-wrapped", line 9, in <module>
sys.exit(cli.cli())
File "/nix/store/b1pz8zmx76gay0aj939n4irnbqwc77sf-python2.7-click-7.0/lib/python2.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/nix/store/b1pz8zmx76gay0aj939n4irnbqwc77sf-python2.7-click-7.0/lib/python2.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/nix/store/b1pz8zmx76gay0aj939n4irnbqwc77sf-python2.7-click-7.0/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/nix/store/b1pz8zmx76gay0aj939n4irnbqwc77sf-python2.7-click-7.0/lib/python2.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/nix/store/b1pz8zmx76gay0aj939n4irnbqwc77sf-python2.7-click-7.0/lib/python2.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/nix/store/b1pz8zmx76gay0aj939n4irnbqwc77sf-python2.7-click-7.0/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/nix/store/ck0c5r9lzb05ly2z4d9gbjkd7gdyqgpz-tmuxp-1.5.4/lib/python2.7/site-packages/tmuxp/cli.py", line 814, in command_load
load_workspace(config[-1], **tmux_options)
File "/nix/store/ck0c5r9lzb05ly2z4d9gbjkd7gdyqgpz-tmuxp-1.5.4/lib/python2.7/site-packages/tmuxp/cli.py", line 527, in load_workspace
_reattach(builder.session)
File "/nix/store/ck0c5r9lzb05ly2z4d9gbjkd7gdyqgpz-tmuxp-1.5.4/lib/python2.7/site-packages/tmuxp/cli.py", line 390, in _reattach
session.switch_client()
File "/nix/store/2mqsnqhzrs4v2qqp8bzbbm3frsdq8bch-python2.7-libtmux-0.8.2/lib/python2.7/site-packages/libtmux/session.py", line 134, in switch_client
raise exc.LibTmuxException(proc.stderr)
libtmux.exc.LibTmuxException: [u'no current client']
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in tmuxp/cli.py at load_workspace and _reattach, then inspect libtmux session.switch_client handling. Reproduce the issue with TMUX= tmuxp load ... and compare it with env -u TMUX tmuxp load .... Done means attaching to an existing session succeeds without the “no current client” traceback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100