When comparing tmux vs The Silver Searcher (Ag), the Slant community recommends tmux for most people. In the question“What are the best shell powertools?” tmux is ranked 1st while The Silver Searcher (Ag) is ranked 2nd. The most important reason people chose tmux is:
As long as you don't close your session, you may even lose your SSH connection, it'll keep your state just as it was. So you can resume where you left off (via `tmux attach`).
Ranked in these QuestionsQuestion Ranking
Pro Preserve the state
As long as you don't close your session, you may even lose your SSH connection, it'll keep your state just as it was. So you can resume where you left off (via
Pro Maximize screen space
As a tiling window manager, it'll make use of all the space. As you have multiple workspaces and you can resize, etc. you can adjust to see what matters most.
Pro Easily split panes
There is a keyboard shortcut that makes it easy to split a window and create more panes.
Pro Mouse support
Mouse support can optionally be enabled, allowing e.g. scrolling with the mouse wheel, or switching panes with mouse clicks.
Pro Windows linked to sessions
tmux calls the individual shell instances windows. They are displayed like tabs in the status line. These windows can be shared between different sessions, so that any given shell instance can be in any number of tmux sessions used for different purposes or by different users. This allows configurations like the following example: User A: wAB, wA1, wA2; User B: wB1, wAB, wB2
Pro Frequently updated
Tmux is in a state of constant development. Updates are frequent and bug reports usually get an answer within days.
Pro Really fast
It is written in C. It is up to 10 times faster than ack.
Pro Ignores files in .gitignore by default
It ignores file patterns from your
.ignore. This can be a bit buggy though.
Pro Simple syntax
Pro Supports PCRE RegExp
Supports RegEx like look-ahead/behind (only fixed length lookbehind however).
Pro No need to manage another config file or learn a new config syntax
Everything is managed with command line args, meaning you can store commonly used options through
.bashrc aliases, bash scripts, and/or autocompletion. There is no config file format to learn or extra dotfiles to manage.
Con Bad scrolling support
Con No builtin telnet or serial support
It's considered bloat by the maintainers and for this reason there's no builtin support for them.
Con You have to remember commonly used options and add them as flags everytime
You are not able to define options in a config file as there is none. (You have to use a shell alias or wrapper script to get your default options.)
Con Cannot add custom file types
All file types ag is able to search for are baked into the executable. There is no way to add new ones neither via command line nor via (the not existing) config file. The only way is a pull request on github and waiting for a new release.