feat(functiions): add fuck
This commit is contained in:
parent
719786d9ac
commit
85ac9a7fb4
2 changed files with 13 additions and 1 deletions
12
.zsh_functions/fuck.zsh
Normal file
12
.zsh_functions/fuck.zsh
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
function fuck {
|
||||||
|
local nth_last=${1:-1}
|
||||||
|
if [[ "$nth_last" =~ ^[0-9]+$ ]]; then
|
||||||
|
sudo $(fc -ln -$nth_last -$nth_last)
|
||||||
|
else
|
||||||
|
echo "Usage: fuck [offset]"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
alias please='fuck'
|
||||||
|
|
2
.zshrc
2
.zshrc
|
@ -21,7 +21,7 @@ unsetopt allexport
|
||||||
autosource youtube
|
autosource youtube
|
||||||
autosource milan
|
autosource milan
|
||||||
autosource nas
|
autosource nas
|
||||||
|
autosource fuck
|
||||||
|
|
||||||
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
|
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue