-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small compatibility fixes #27
Conversation
dwmw2
commented
Dec 3, 2021
- Echo input from non-tty stdin
- Fix Ctrl-R key handling
- Simple build fixes
b81bfda
to
ac8b56a
Compare
Thanks. C++ support seems fine. What is the rationale for echoing input. If I do this I get double output. One from the terminal and one from the echo.
Regarding reverse-i-search, really - is that how it is supposed to work? How to go forward again after skipping past the one you want? I suppose we have to be compatible, but I prefer mine :-( |
Ah, as noted in the commit comment, this was intended for the case where it isn't a tty. I hadn't spotted that I'm a little confused by the errno setting... can I make Or just do this perhaps...
|
Honestly, this is one of those cases where my fingers' muscle memory knows more than my conscious brain. They definitely want that repeated Ctrl-R to keep going backwards. It turns out that Ctrl-S is the 'search forwards' command, which doesn't actually work in practice unless you do |
Yes. That will probably do. Use of errno is probably lost in the mists of time (not literally - it would have come from original linenoise). |
With the ^S change, I think this all looks good but will take some time before I can test thoroughly and merge (busy time leading up to Christmas) so I'll get to it in due course. Thanks. |
A couple of functions should be static as they have no prototypes in the header files. Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Pressing Ctrl-R again while in reverse-i-search should search back further, while up/down cursor should navigate to the adjacent lines in history rather than searching for matches. Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
As noted in https://superuser.com/questions/610980/ you can't actually use this (in readline or linenoise) unless you disable XON/XOFF flow control processing in the terminal with 'stty -ixon'. Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Branch updated and rebased, updated the list of keybindings that you've added in the meantime. Also added @metinkaya's allocation checks from dwmw2#1 |
Thanks. I will get to this soon but I won’t be merging the allocation checks. IMHO checking for allocation failure achieves no useful purpose on modern operating systems. |
I merged the earlier commits and made a few small changes to ctrl-r/s |
I didn't get a response, so I merged that branch. Any problems can be raised in a new issue. |