fix(bindings): Avoid clobbering readline #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 usefulreadline binding, for example:
Ctrl-r ...
to find a long command in shell historyCtrl-a
to jump to the beginning of the commandM-f
to jump one word forward past the root commandRET
to run the commandThroughout 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 bestprefix. Suspending a process is an uncommon task relative to readline usage and the
double-prefix is fine for that task in my experience.