* Re: readling, ctrl-u is not working like linux console
2019-10-16 8:57 ` Roland Hieber
@ 2019-10-16 9:14 ` Ulrich Ölmann
2019-10-16 13:47 ` duhuanpeng
2019-10-16 15:01 ` Robert Karszniewicz
2 siblings, 0 replies; 7+ messages in thread
From: Ulrich Ölmann @ 2019-10-16 9:14 UTC (permalink / raw)
To: barebox; +Cc: r.karszniewicz
On Wed, Oct 16 2019 at 10:57 +0200, Roland Hieber <rhi@pengutronix.de> wrote:
> On Wed, Oct 16, 2019 at 04:57:45AM +0800, duhuanpeng wrote:
>> Hi,
>>
>> I find it the barebox console's ctrl-u is not working like my
>> linux host.
>> for now, the barebox's ctrl-u discard the whole line. but the
>> linux consle just remove characters before cursor.
>> is the barebox ctrl-u follows any standard, if not, how about
>> make it just works like linux(ah, it is gnu readline) does.
>
> FWIW, in bash on both my tty2 and urxvt, Ctrl-U clears the whole line.
> But I don't know if there is a standard for this shortkey.
See this section [1] in the readline documentation.
Best regards
Ulrich
[1] https://tiswww.case.edu/php/chet/readline/readline.html#SEC17
--
Pengutronix e.K. | Ulrich Ölmann |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: readling, ctrl-u is not working like linux console
2019-10-16 8:57 ` Roland Hieber
2019-10-16 9:14 ` Ulrich Ölmann
@ 2019-10-16 13:47 ` duhuanpeng
2019-10-17 8:54 ` Roland Hieber
2019-10-16 15:01 ` Robert Karszniewicz
2 siblings, 1 reply; 7+ messages in thread
From: duhuanpeng @ 2019-10-16 13:47 UTC (permalink / raw)
To: Roland Hieber; +Cc: barebox, r.karszniewicz
>
> FWIW, in bash on both my tty2 and urxvt, Ctrl-U clears the whole line.
did you try to move your cursor in the middle of a line.
I guess my bash use this keybinds:
[1] https://www.gnu.org/software/bash/manual/bash.html#Bindable-Readline-Commands
8.4.4 Killing And Yanking
kill-line (C-k)
Kill the text from point to the end of the line.
backward-kill-line (C-x Rubout)
Kill backward from the cursor to the beginning of the current line.
unix-line-discard (C-u)
Kill backward from the cursor to the beginning of the current line.
kill-whole-line ()
Kill all characters on the current line, no matter where point is. By default, this is unbound.
Regards,
duhuanpeng
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: readling, ctrl-u is not working like linux console
2019-10-16 13:47 ` duhuanpeng
@ 2019-10-17 8:54 ` Roland Hieber
0 siblings, 0 replies; 7+ messages in thread
From: Roland Hieber @ 2019-10-17 8:54 UTC (permalink / raw)
To: barebox, r.karszniewicz
On Wed, Oct 16, 2019 at 09:47:05PM +0800, duhuanpeng wrote:
> >
> > FWIW, in bash on both my tty2 and urxvt, Ctrl-U clears the whole line.
>
> did you try to move your cursor in the middle of a line.
Ah, I misread your first mail. Yes, my bash only discards characters
before the cursor until the start of the line.
- Roland
>
> I guess my bash use this keybinds:
>
> [1] https://www.gnu.org/software/bash/manual/bash.html#Bindable-Readline-Commands
>
> 8.4.4 Killing And Yanking
> kill-line (C-k)
> Kill the text from point to the end of the line.
>
> backward-kill-line (C-x Rubout)
> Kill backward from the cursor to the beginning of the current line.
>
> unix-line-discard (C-u)
> Kill backward from the cursor to the beginning of the current line.
>
> kill-whole-line ()
> Kill all characters on the current line, no matter where point is. By default, this is unbound.
>
>
> Regards,
> duhuanpeng
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Roland Hieber | r.hieber@pengutronix.de |
Pengutronix e.K. | https://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: readling, ctrl-u is not working like linux console
2019-10-16 8:57 ` Roland Hieber
2019-10-16 9:14 ` Ulrich Ölmann
2019-10-16 13:47 ` duhuanpeng
@ 2019-10-16 15:01 ` Robert Karszniewicz
2019-10-16 15:33 ` duhuanpeng
2 siblings, 1 reply; 7+ messages in thread
From: Robert Karszniewicz @ 2019-10-16 15:01 UTC (permalink / raw)
To: barebox
On 10/16/19 10:57 AM, Roland Hieber wrote:
> On Wed, Oct 16, 2019 at 04:57:45AM +0800, duhuanpeng wrote:
>> Hi,
>>
>> I find it the barebox console's ctrl-u is not working like my
>> linux host.
>> for now, the barebox's ctrl-u discard the whole line. but the
>> linux consle just remove characters before cursor.
>> is the barebox ctrl-u follows any standard, if not, how about
>> make it just works like linux(ah, it is gnu readline) does.
>
> FWIW, in bash on both my tty2 and urxvt, Ctrl-U clears the whole line.
> But I don't know if there is a standard for this shortkey.
>
> - Roland
>
In some shells, like mksh, the default behaviour of ctrl-u is to kill
the whole line. But then it's not called unix-line-discard, and I don't
think mksh uses readline, either. The "standard" is probably just
readline, though it makes me wonder where the "unix" came from…
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: readling, ctrl-u is not working like linux console
2019-10-16 15:01 ` Robert Karszniewicz
@ 2019-10-16 15:33 ` duhuanpeng
0 siblings, 0 replies; 7+ messages in thread
From: duhuanpeng @ 2019-10-16 15:33 UTC (permalink / raw)
To: Robert Karszniewicz; +Cc: barebox
>
> In some shells, like mksh, the default behaviour of ctrl-u is to kill the
> whole line. But then it's not called unix-line-discard, and I don't think
> mksh uses readline, either. The "standard" is probably just readline, though
> it makes me wonder where the "unix" came from…
Hi, to avoid run into this issues:
> The program in a Unix-like system that allocates machine resources and talks to the hardware is called the “kernel”. GNU is typically used with a kernel called Linux. This combination is the GNU/Linux operating system. GNU/Linux is used by millions, though many call it “Linux” by mistake.
I think it is better to descript it what it ctrl-u does:
Kill backward from the cursor to the beginning of the current line.
:)
Regards,
duhuanpeng
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 7+ messages in thread