Closed ghost closed 9 years ago
what? do you want backspace to be considered a valid char in the input instead of removing the last char?
Preferably it would remove the last character. Currently, backspace is just echoed back. For example:
highlight: acd^H^Hbcd
Not for me. I tried on several terminals and operating systems. Can you provide more details of your setup?
On 06 Apr 2015, at 14:54, Evan Teitelman notifications@github.com wrote:
Preferably it would remove the last character. Currently, backspace is just echoed back. For example:
highlight: acd^H^Hbcd — Reply to this email directly or view it on GitHub.
Apparently the function uses fgets
, leaving any processing up to the terminal. The problem occurs with line disciplines that process delete but not backspace (most modern line disciplines behave in this manner). Also, it would be nice if highlight processed arrow keys and such. Using some sort of readline implementation for highlight would fix this.
nope its not, its already using dietline
can you provide arch/os/r2version?
Version is:
radare2 0.9.9-git 7535 @ linux-little-x86-64 git.0.9.8-1186-g560e983
commit: 560e983d6a9a328aa26662a90b7b1b317edc5db8 build: 2015-04-07
Also, would help to mention the name of terminal which behaves like this.
Iirc i already fixed this
On 07 Apr 2015, at 16:28, Evan Teitelman notifications@github.com wrote:
Apparently the function uses fgets, leaving any processing up to the terminal. The problem occurs with line disciplines that process delete but not backspace (most modern line disciplines behave in this manner). Also, it would be nice if highlight processed arrow keys and such. Using some sort of readline implementation for highlight would fix this.
— Reply to this email directly or view it on GitHub.
The highlight command (
/
) responds to delete (ascii 0x7F) but not backspace/\b
(ascii 0x7). Most modern terminals translate the 'Backspace' key to delete. Some older terminals translate it to backspace. For compatibility reasons, both are usually supported. Perhaps we could make highlight use dietline.