Add more fallbacks when terminfo or fiddle is not available #722
+11
−7
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.
Add xterm key bindings to comprehensive list. Add fallback escape sequence of cursor hide/show.
Reline works perfectly in xterm without fiddle and terminfo.
Add xterm kpp knp kdch1(kdch1 was already added) to comprehensive list because I think it is the most major
ENV['TERM']
value.Add cursor show/hide escape sequence fallback
"\e[?25h"
and"\e[?25l"
."\e[?#{number}#{enable ? 'h' : 'l'}"
(Terminal private modes set and rest, DECSET DECRST) is a commonly used escape sequence. Even if terminal emulator does not recognize it, it will be just ignored. Note that GNU Readline always outputs DECSET of bracketed paste"\e[?2004h"
even if TERM=dumb.The value is slightly different from
infocmp xterm
. But I think simple one (just reset extension number 25 = cursor visibility) is safer on non-xterm environment.