Skip to content
破仑的博客
Go back

Bash 移动快捷键

Bash 移动快捷键备忘

昨天(2017年4月4日)发现bash默认的快捷键是emacs的,可以设置成vi: set -o vi, zsh设置成vi是: bindkey -v

下面是emacs的模式:

总是在Windows上用git bash操作git的时候嫌用方向键移动麻烦,所以在这里简单的总结一下bash的移动命令

快捷键说明
Ctrl + AGo to the beginning of the line you are currently typing on
Ctrl + EGo to the end of the line you are currently typing on
Ctrl + LClears the Screen, similar to the clear command
Ctrl + UClears the line before the cursor position. If you are at the end of the line, clears the entire line.
Ctrl + HSame as backspace
Ctrl + RLet’s you search through previously used commands
Ctrl + CKill whatever you are running
Ctrl + DExit the current shell
Ctrl + ZPuts whatever you are running into a suspended background process. fg restores it.
Ctrl + WDelete the word before the cursor
Ctrl + KClear the line after the cursor
Ctrl + TSwap the last two characters before the cursor
Esc + TSwap the last two words before the cursor
Alt + FMove cursor forward one word on the current line
Alt + BMove cursor backward one word on the current line
TabAuto-complete files and folder names

Share this post on:

Previous Post
利用Ngin配置二级域名
Next Post
博客墙