Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what does u stand for in ctrl+u? [closed]

I was trying to understand and remember keyboard shortcuts for bash. I was wondering why is the char 'u' used in

CTRL-u --- cancel the line before cursor location
like image 302
draw Avatar asked Dec 11 '10 06:12

draw


2 Answers

While unix-line-discard is a good mnemonic, the use of CTRL+U as a line-erase character precedes the invention of UNIX. It was used as such on various Digital Equipment (DEC) systems, including the PDP-8. For instance, from my dusty bookshelf I see that CTRL+U was used as line-erase in the PDP-8 Symbolic Editor (page 5-13 of the 1972 edition of the PDP-8 Introduction To Programming (Volume 1) manual published by DEC). In fact, in the early days of UNIX, the @ character was often the default line-erase character. Other systems used CTRL+X for the same function, which made some sense since the ASCII control character description for it is Cancel. The DEC convention of CTRL+U eventually won out in the popularity contest.

like image 153
Ned Deily Avatar answered Oct 20 '22 17:10

Ned Deily


"unix-line-discard": http://cnswww.cns.cwru.edu/php/chet/readline/readline.html#SEC17

like image 21
Adam Vandenberg Avatar answered Oct 20 '22 18:10

Adam Vandenberg