blob: 5f97884b1018d7db0fd69f45db9ac1346d611543 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#!/usr/bin/env bash
HISTFILE=~/.zsh_history
function wh_two_back {
command=$(history | tail -n 2 | head -n 1 | cut -c 8-)
echo -n $command
}
function wh_three_back {
command=$(history | tail -n 3 | head -n 1 | cut -c 8-)
echo -n "$command"
}
function wh_four_back {
command=$(history | tail -n 4 | head -n 1 | cut -c 8-)
echo -n "$command"
}
function wh_five_back {
command=$(history | tail -n 5 | head -n 1 | cut -c 8-)
echo -n "$command"
}
|