blob: 7b7c5e2488be0a2d357a1aa779bbf0d58b88f622 (
plain) (
blame)
1
2
3
4
5
6
7
8
|
# run previous non-doas command with doas; or retry previous doas command
fuck() {
typeset n=$(fc -l 1 | egrep -v '^[0-9]+[ ]*fuck' | tail -n 1 | cut -d' ' -f1)
fc -e "ed -s" "$n" <<-EOF
,v/^doas/s/^/doas /
w
EOF
}
|