GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
The freeze help message suggests it supports to freeze several sessions.
(tmuxp) tmuxp (master) ✗ tmuxp freeze -h
usage: tmuxp freeze [-h] [-L socket-name] [-S socket-path] [-y]
session_name [session_name ...]
But the result I got is not as expected.
(tmuxp) tmuxp (master) ✗ tmuxp freeze 0 1 3
args is Namespace(answer_yes=None, callback=<function command_freeze at 0x9036b8c>, colors=None, session_name=['0', '1', '3'], socket_name=None, socket_path=None)
session name are ['0', '1', '3']
Traceback (most recent call last):
File "/home/maomao/.virtualenvs/tmuxp/bin/tmuxp", line 9, in <module>
load_entry_point('tmuxp==0.1.0rc4', 'console_scripts', 'tmuxp')()
File "/home/maomao/workspace/tmuxp/tmuxp/cli.py", line 958, in main
File "/home/maomao/workspace/tmuxp/tmuxp/cli.py", line 335, in command_freeze
File "/home/maomao/workspace/tmuxp/tmuxp/util.py", line 159, in findWhere
return self.where(attrs) or None
IndexError: list index out of range
I can confirm that the valid session names are 0 1 3 in my case.
(tmuxp) tmuxp (master) ✗ tmux list-sessions
0: 2 windows (created Tue Dec 3 16:01:57 2013) [213x54] (attached)
1: 1 windows (created Wed Dec 4 10:50:35 2013) [213x54]
3: 1 windows (created Wed Dec 4 20:47:53 2013) [80x23]
Currently, arguments are being accepting multiple words and concatenating them by spaces so users don't have to escape spaces in session names.
This will require updating autocomplete to add a \ for spaces in session names.
#30 midway commit for fixing cli arguments
#30 midway commit for CLI update, for one session name in outout.
The autocomplete seems to escape all special characters in session name, not only spaces.
I just try session names like test-1, test_1, and it gives me test\-1, test\_1.
Is this behavior by design?
Then it's by design.
And the About tmux page is really helpful!
This was a midway update experimenting with how to fix escaping on bash completion.
Previously, argparse appeared to accept multiple arguments. In practice, it concatenated unescaped spaces into a full session name.
Now, argparse accepts one argument, but what about argcomplete (our bash completer) where there is special symbols and spaces in the name?
Currently, the solution to this problem is going to require changes to argcomplete, the situation is a bit more complicated because it involves escaping for both zsh and bash, argcomplete's zsh and bash script, and argcomplete's way of returning the completions, and tmux allows many special chars for session names.
This is indeed a larger issue @leechannl. I moved the recent work to a branch in https://github.com/tony/tmuxp/tree/new_completion.
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
This bot is used to handle issues where the issue hasn't been discussed or
has gone out of date. If an issue isn't resolved and handled in a certain
period of time, it may be closed. If you would like your issue re-opened,
please create a fresh issue with the latest, up to date information and
mention this issue in it.