mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2024-11-22 12:57:01 +00:00
edit command order
This commit is contained in:
parent
1c5bd35608
commit
b6ff5a9fcc
50
README.md
50
README.md
@ -61,31 +61,6 @@ Esc + c
|
||||
# converts letter under the cursor to uppercase, rest of the word to lowercase.
|
||||
```
|
||||
|
||||
##### Using vi-mode in your shell
|
||||
```bash
|
||||
set -o vi
|
||||
# change bash shell to vi mode
|
||||
# then hit the Esc key to change to vi edit mode (when `set -o vi` is set)
|
||||
k
|
||||
# in vi edit mode - previous command
|
||||
j
|
||||
# in vi edit mode - next command
|
||||
0
|
||||
# in vi edit mode - beginning of the command
|
||||
R
|
||||
# in vi edit mode - replace current characters of command
|
||||
2w
|
||||
# in vi edit mode - next to 2nd word
|
||||
b
|
||||
# in vi edit mode - previous word
|
||||
i
|
||||
# in vi edit mode - go to insert mode
|
||||
v
|
||||
# in vi edit mode - edit current command in vi
|
||||
man 3 readline
|
||||
# man page for complete readline mapping
|
||||
```
|
||||
|
||||
##### Run history number (e.g. 53)
|
||||
```bash
|
||||
!53
|
||||
@ -156,6 +131,31 @@ $USER current username
|
||||
$HOSTNAME current hostname
|
||||
```
|
||||
|
||||
##### Using vi-mode in your shell
|
||||
```bash
|
||||
set -o vi
|
||||
# change bash shell to vi mode
|
||||
# then hit the Esc key to change to vi edit mode (when `set -o vi` is set)
|
||||
k
|
||||
# in vi edit mode - previous command
|
||||
j
|
||||
# in vi edit mode - next command
|
||||
0
|
||||
# in vi edit mode - beginning of the command
|
||||
R
|
||||
# in vi edit mode - replace current characters of command
|
||||
2w
|
||||
# in vi edit mode - next to 2nd word
|
||||
b
|
||||
# in vi edit mode - previous word
|
||||
i
|
||||
# in vi edit mode - go to insert mode
|
||||
v
|
||||
# in vi edit mode - edit current command in vi
|
||||
man 3 readline
|
||||
# man page for complete readline mapping
|
||||
```
|
||||
|
||||
## Variable
|
||||
[[back to top](#handy-bash-one-liners)]
|
||||
##### Variable substitution within quotes
|
||||
|
Loading…
Reference in New Issue
Block a user