ohmyzsh/plugins/fuck/fuckyou.zsh
Sietse van der Molen b5ee25ff94 Add fuck you function, to rage quit processes.
Signed-off-by: Sietse van der Molen <sietse@vdmolen.eu>
2014-02-22 02:38:34 +01:00

25 lines
803 B
Bash
Executable file
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/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( Its not very effective... )\n"
fi
}