I open an xterm terminal (80 columns x 24 lines), then run
$ bash --norc --noprofile, and then
$ tty to get the file name of the terminal: the output is
From another terminal I run:
$ printf foo >/dev/pts/9
foo is printed on the shell command-line in the first terminal.
If I press
C-u to run
unix-line-discard (name of the function given by
$ bind -P | grep -i c-u),
foo is not removed.
If I insert 11 spaces and press
C-u, the spaces are removed but not
If I insert 12 spaces and press
C-u, the spaces are removed as well as
Why can't I remove
foo when I press
C-u while my cursor is right after it, and why do I need to insert 12 characters to remove it?
$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.6 LTS Release: 16.04 Codename: xenial $ bash --version | head -n1 GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu) $ xterm -version XTerm(322)