3 ms·
As much as I like its functionality, the tmux program ux is terribly unintuitive. From the crash course: tmux new -s session_name creates a new tmux sess
by 7373737373 8y ago
As much as I like its functionality, the tmux program ux is terribly unintuitive. From the crash course:
tmux new -s session_name
creates a new tmux session named session_name
tmux attach -t session_name
attaches to an existing tmux session named session_name
tmux switch -t session_name
switches to an existing session named session_name
tmux list-sessions
lists existing tmux sessions
tmux detach (prefix + d)
detach the currently attached session
The -s/-t feel like they should not be required. They shouldn't even be different in the first place. list-sessions should just be list, since the -sessions is implicit in all other commands as well. Exiting from a session (ctrl+b d) is another new thing too. If that were at least like vim (which is terrible as well, but esc :q), it would be much easier to interact with. Only after reading the man pages these make sense.
- nerdponx 8y agoTo be fair, "d" is a mnemonic for "detach".
- adamrt 8y ago> If that were at least like vim (which is terrible as well, but esc :q), it would be much easier to interact with. How would you do "esc :q" if you were using vim inside tmux? :)
- easytiger 8y ago> Exiting from a session (ctrl+b d) is another new thing too. If that were at least like vim (which is terrible as well, but esc :q), it would be much easier to interact with. I'm afraid I don't understand your point. What is the issue with detach? You want an non controlled escape key press to be your command trigger? How does that make any sense?
- LyndsySimon 8y agoI agree with you in principle, and feel like tmux was written "for programmers" and therefore the author(s) felt it more important to be consistent than usable. For instance: I'm pretty sure with `tmux list-sessions` because the command inside tmux is `:list-sessions`. It wouldn't be terribly hard to write a wrapper for the command itself that works the way you want it to. As simple as it seems, I think that would probably be something useful to create and release.
- abcdef123xyz123 8y agoNot so much for programmers, but I think certainly for people used to the terminal. If you know how to use the shell or a sophisticated editor like vi or emacs, tmux should not be a particular challenge. The target audience is not Unix beginners.
- bpchaps 8y agoI've used tmux on a daily basis for about four years and have no idea what -t or -s do. My workflow is from a single machine, where I don't need to have multiple sessions - just different windows. For any remote sessions, I just use screen. Doing so has the added benefit of not conflicting with others' workflows, which are likely screen-bound. tmux's defaults are pretty much universally thought of as awful. Change ctrl-b fo ctrl-a and find some plugins that you like. Also, consider swapping Ctrl and capslock! My conf: https://github.com/red-bin/dotfiles/blob/master/tmux.conf https://github.com/red-bin/dotfiles/blob/master/tmux.conf
- pulsarpietro 8y agoActually I use it in place of screen. I always thought of it as "a better screen"
- bpchaps 8y agoIt definitely is! Though, I've found not enough people know it well enough to make it useful in any distubutrd environment, since it just confuses everyone who's already used screen. And it gets worse because everyone who knows tmux has their own config and workflows. So it's kind of a lose-lose. Screen also has some much better defaults.
- abcdef123xyz123 8y agoIt isn't really implicit, it is just a shorthand, new is short for new-session and attach for attach-session. The alias for list-sessions is "ls" not "list". I don't know why you would say -s shouldn't be required. Are you suggesting that "tmux new -sname command" should be something like "tmux new -ccommand name" instead? The intent of -t is that it works much the same for all commands. Of course you need to read the manual for anything more than the very basics, but tmux is hardly unique in that. Vim is hardly intuitive in any way.
- ben_bai 8y agoTo be fair most tmux use cases are: ssh -> tmux -> start something -> ctrl-b d -> logout and maybe later: ssh -> tmux a to check the status.
- pulsarpietro 8y agoNot sure. I have seen people having two windows: 1. Vim 2. Terminal for compiling I found it quite handy, then I discovered Emacs :-) We could stay on the subject for years I reckon.