nested-tmux
nested-tmux copied to clipboard
fix(bindings): Avoid clobbering readline
Readline provides a pretty powerful set of command-line searching and editing features
that can greatly increase CLI efficiency. The readline library is also supported by
many interactive prompts, including language interactive REPLs. Finally, many other
tools emulate readline bindings for similar tasks. Given how frequently it can be used
and that it's used in the inner loop of command-line usage, its usage should be very
fast and as such every effort should be made to avoid adding any delay to it's bindings,
such as repeating the tmux prefix. Ctrl-a is a particularly common and useful
readline binding, for example:
Ctrl-r ...to find a long command in shell historyCtrl-ato jump to the beginning of the commandM-fto jump one word forward past the root command- Add a CLI option to the command
RETto run the command
Throughout my years with screen, tmux, various editors and rich readline usage, I've
tried a number of prefixes and I agree with many others that Ctrl-z is the best
prefix. Suspending a process is an uncommon task relative to readline usage and the
double-prefix is fine for that task in my experience.