2012-09-08 17 views

回答

49

Ctrl-u - Cut everything before the cursor


其他擊快捷方式,

  • 按Ctrl-a Move cursor to beginning of line
  • CTRL-E Move cursor to end of line
  • CTRL-B使Move cursor back one word
  • CTRL-F Move cursor forward one word
  • CTRL-W Cut the last word
  • CTRL-K Cut everything after the cursor
  • CTRL-Y Paste the last thing to be cut
  • Ctrl鍵-_ Undo

附加bash命令行快捷速查表:http://www.bigsmoke.us/readline/shortcuts

見這裏的文檔:http://www.gnu.org/software/bash/manual/bashref.html#Commands-For-Killing

+3

在我的系統上,ctrl-b和ctrl-f移動一個字符。 –

+0

關於這些「官方」文檔在哪裏?爲什麼你只展示魚而不展示如何釣魚? – qazwsx

+0

@Problemania我添加了一個鏈接。一般來說,man或info頁面是一個很好的開始,嘗試運行命令'man',後跟您使用的unix工具的名稱(例如'man bash')。 –

3

熱鍵Ctrl+U應該爲你做這個。

-2

CTRL + X退格清楚之前光標當前位置

1

在zsh的所有條目,Alt鍵瓦特光標前清除所有字符。

與bash相比,這並不能削減它們;它只是刪除它們。

相關問題