dushaoshuai / dushaoshuai.github.io

https://www.shuai.host
0 stars 0 forks source link

bash 命令行编辑快捷键 #149

Open dushaoshuai opened 1 week ago

dushaoshuai commented 1 week ago
C-b Move back one character. C-f Move forward one character. DEL or Backspace Delete the character to the left of the cursor.
C-d Delete the character underneath the cursor. C-_ Undo the last editing command. C-a Move to the start of the line.
C-e Move to the end of the line. M-f Move forward a word. M-b Move backward a word.
C-l Clear the screen. C-k Kill the text from the current cursor position to the end of the line. C-u Kill the text from the current cursor position to the start of the line.
M-d Kill from the cursor to the end of the current word. M-DEL Kill from the cursor to the start of the current word. C-w Kill from the cursor to the previous whitespace.
C-y Yank the most recently killed text back into the buffer at the cursor. M-y Rotate the kill-ring, and yank the new top. M-1 Readline Arguments.
M--1 Readline Arguments. C-r Incremental reverse search. C-j Accept search result but not execute it.
RET (in search) Accept search result and execute it. C-g Abort an incremental search and restore the original line. C-p Previous history.
C-n Next history. TAB Complete.