Skip to content

Commit b63cf05

Browse files
author
Ove Tislevoll
committed
Added more stuff, renamed the blog
1 parent f462d12 commit b63cf05

File tree

2 files changed

+24
-9
lines changed

2 files changed

+24
-9
lines changed

docs/bash_hotkeys.md

+23-8
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,21 @@ The most used key by far. I probably use this between every 5 other keystrokes o
1010
good measure. It never hurts, sometimes does nothing, mostly helps.
1111

1212
- Completes file paths
13+
- Completes environment variable names
1314
- Completes commands and command arguments (if this doesn't work, make sure you have the
1415
bash-completion package installed).
1516

1617
!!! tip
1718

1819
It is possible to create custom completion files for your custom scripts
1920

21+
2022
++alt+period++
2123

2224
Probably my second most used combination. It inserts **the last argument in the previous command**.
2325

24-
This sounds obscure, but is surprisingly good in many cases, because of how arguments in the CLI
25-
is usually structured (e.g. filename goes last)
26+
This might sound obscure, but is surprisingly good in many cases, because of how arguments in the
27+
CLI is usually structured (e.g. filename goes last)
2628

2729
```bash
2830
mkdir -p my_directory/with_the/longest-name_possible
@@ -39,22 +41,35 @@ git add [alt+.] # To stage it with version control
3941

4042
The list goes on.
4143

42-
++alt+0++
44+
!!! tip
45+
46+
++alt+0++
47+
48+
A variation of the previous hotkey. Will paste the first argument of the previous command (which is
49+
actually the base command itself)
50+
51+
Useful when you have a difficult-to-write command like `firewall-cmd --add-port=123/udp` then
52+
`firewall-cmd --reload`, or something else where you want to repeat the command multiple times.
4353

44-
A variation of the previous hotkey. Will paste the first argument of the previous command (which is
45-
actually the base command itself)
54+
Also useful when you want to use the man page for the previous command, like `man [alt+0]`
4655

47-
Useful when you have a difficult-to-write command like `firewall-cmd --add-port=123/udp` then
48-
`firewall-cmd --reload`, or something else where you want to repeat the command multiple times.
4956

50-
++ctrl+r++
57+
### ++ctrl+r++
5158

5259
Reverse command search. You know what your command is, but you don't feel like typing it all.
5360
Just use ++ctrl+r++, then search for something unique to your command. Didn't find it on the first
5461
try? Just run ++ctrl+r++ again for the next result. Mistyped? Use ++ctrl+c++ and try again.
5562

5663
`!!`
5764

65+
This basically just means "the entire last command". I've found about 2 uses for it, but I use them
66+
often:
67+
68+
`sudo !!` - Repeat the last command, but with sudo
69+
70+
`watch !!` - Run the last command over and over.
71+
72+
5873
++ctrl+u++ and ++ctrl+y++
5974

6075
++ctrl+a++ and ++ctrl+e++

mkdocs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
site_name: Ovenotes
1+
site_name: Effectivitivity
22

33
theme:
44
name: material

0 commit comments

Comments
 (0)