mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-13 03:01:32 +01:00
Add fuck you function, to rage quit processes.
Signed-off-by: Sietse van der Molen <sietse@vdmolen.eu>
This commit is contained in:
parent
598a9c6f99
commit
b5ee25ff94
1 changed files with 25 additions and 0 deletions
25
plugins/fuck/fuckyou.zsh
Executable file
25
plugins/fuck/fuckyou.zsh
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
function swagdatstring() {
|
||||
local chars=" -_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
|
||||
local flipped=" -_ɐqɔpǝɟɓɥıɾʞlɯuodbɹsʇnʌʍxʎz∀𐐒ƆᗡƎℲ⅁HIſ⋊⅂WNOԀΌᴚS⊥∩ΛMX⅄Z⇂ᄅƐㄣގ9ㄥ860"
|
||||
local newstring=''
|
||||
|
||||
for ((i = ${#1}; i > 0; i--)); do
|
||||
newstring+=${flipped[${chars[(i)${1[$i]}*]}]}
|
||||
done
|
||||
echo $newstring
|
||||
}
|
||||
|
||||
function fuck() {
|
||||
if [ $# -le 1 ]; then
|
||||
print "Usage: fuck you [process]"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [ pkill -9 $@[2]]; then
|
||||
print "\n(╯°□°)╯︵ " $(swagdatstring $@[2]) "\n"
|
||||
else
|
||||
print "\n(; ̄Д ̄) . o O( It’s not very effective... )\n"
|
||||
fi
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue