Make fish_key_reader's output simpler (#8467)

* fish_key_reader: Simplify default output

It now only prints the bind statement. Timing information and such is
relegated to a separate "verbose" mode.

* Adjust fish_key_reader docs

* Adjust tests
This commit is contained in:
Fabian Homborg
2021-11-22 17:22:22 +01:00
committed by GitHub
parent 084458bc47
commit f2fd30df03
4 changed files with 50 additions and 24 deletions

View File

@@ -487,15 +487,11 @@ The key sequence (the ``\cc``) here depends on your setup, in particular the ter
> fish_key_reader # pressing control-c
Press a key:
hex: 3 char: \cC
Press [ctrl-C] again to exit
bind \cC 'do something'
> fish_key_reader # pressing the right-arrow
Press a key:
hex: 1B char: \c[ (or \e)
( 0.077 ms) hex: 5B char: [
( 0.037 ms) hex: 43 char: C
bind \e\[C 'do something'
Note that some key combinations are indistinguishable or unbindable. For instance control-i *is the same* as the tab key. This is a terminal limitation that fish can't do anything about.