Discussion:
[Help-bash] How is read -e different?
D630
2017-05-12 08:43:35 UTC
Permalink
Is there any difference between using Readline via "read -e" and using
it as
normal? And how can I see, whether I am really in "read -e"?
Pierre Gaston
2017-05-12 08:59:52 UTC
Permalink
Is there any difference between using Readline via "read -e" and using it
as
normal? And how can I see, whether I am really in "read -e"?
Do you mean using read without -e vs using read with -e?
With -e you can use all the readline capabilities, without you only have
what your terminal provides

On my terminal with read -e, I can type "foo", press control+a to go at the
beginning of the line, press control+k to kill(cut) everything then control
+ y to yank(paste) it back

Without I only see: foo^A^K^Y
D630
2017-05-12 09:45:11 UTC
Permalink
Post by Pierre Gaston
Is there any difference between using Readline via "read -e" and using it
as
normal? And how can I see, whether I am really in "read -e"?
Do you mean using read without -e vs using read with -e?
With -e you can use all the readline capabilities, without you only have
what your terminal provides
On my terminal with read -e, I can type "foo", press control+a to go at the
beginning of the line, press control+k to kill(cut) everything then control
+ y to yank(paste) it back
Without I only see: foo^A^K^Y
Damn, my bad. I mean using read -e vs. using Readline on a line as
normal without read!
Greg Wooledge
2017-05-12 12:09:45 UTC
Permalink
Post by D630
Damn, my bad. I mean using read -e vs. using Readline on a line as
normal without read!
I still don't understand what you are asking. readline is a C library,
not a command. Various programs (including bash) may link to the
readline library and use its functions to read lines of input from users
in terminal applications. Other programs that use it include gdb and
GNU's bc.

What are you trying to do?

Loading...