Using xterm and bash 4.3 from the (pseudo-)terminal pts/10 we type (█ is the cursor):
test@debian:~$ ps
PID TTY TIME CMD
13128 pts/10 00:00:02 bash
21037 pts/10 00:00:00 ps
test@debian:~$ ls
Mail directory file
test@debian:~$ ls directory
file1 file2 file3
test@debian:~$ ls █
(as you see, there is a space after ls
)
Then from another terminal we send a backspace:
test@debian:~$ echo -ne "\b" > /dev/pts/10
In terminal pts/10 we now have:
test@debian:~$ ls█
We type directory
, so we have:
test@debian:~$ lsdirectory█
Pressing return we get "directory" listed:
file1 file2 file3
test@debian:~$ █
Of course, normally entering lsdirectory
would give us a "command not found"-error. Somewhere the space has been saved. Where?