mirror of
https://github.com/xmengnet/the-art-of-command-line.git
synced 2024-12-25 02:06:28 +08:00
Merge pull request #9 from michaelbarlow7/master
Added a suggestion to add "set -o vi" to ~/.bash_rc to enable vim-keybindings in bash
This commit is contained in:
commit
9f69f5abf0
1 changed files with 2 additions and 0 deletions
|
@ -65,6 +65,8 @@ Notes:
|
|||
|
||||
- In Bash, use **ctrl-w** to delete the last word, and **ctrl-u** to delete the whole line. Use **alt-b** and **alt-f** to move by word, **ctrl-k** to kill to the end of the line, **ctrl-l** to clear the screen. See `man readline` for all the default keybindings in Bash. There are a lot. For example **alt-.** cycles through previous arguments, and **alt-*** expands a glob.
|
||||
|
||||
- Alternatively, add `set -o vi` to your `~/.bashrc` to enable vim-keybindings for bash.
|
||||
|
||||
- To go back to the previous working directory: `cd -`
|
||||
|
||||
- If you are halfway through typing a command but change your mind, hit **alt-#** to add a `#` at the beginning and enter it as a comment (or use **ctrl-a**, **#**, **enter**). You can then return to it later via command history.
|
||||
|
|
Loading…
Reference in a new issue