cuo*_*glm 19
使用Ctrl+ u:
从bash文档中,Killing And Yanking:
unix-line-discard (Cu)
从光标向后杀到当前行的开头。
Ctrl+u行为不仅由具有自己的行编辑器的 shell 控制,例如bash, zsh, tcsh, sh -o emacs,而且还受终端驱动程序在规范模式下的行规范(例如 incat或sh/ 的基本实现,ksh当未启用行编辑器时) )。因此它无处不在。
您可以使用stty -a(或stty -everything在 BSD 系统中)检查终端驱动程序的线路规则:
$ stty -a
speed 38400 baud; rows 24; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?;
swtch = M-^?; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc ixany imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke
Run Code Online (Sandbox Code Playgroud)