Helical Alpha Code

hidetoggle: see those blasted dotfiles!

#!/bin/sh

pref='com.apple.finder AppleShowAllFiles'

function evalpref {
    defaults read $pref
    return;
    }

case $(evalpref) in
    FALSE)
        echo "Hidden Files Visible"
        defaults write $pref TRUE;;
    TRUE)
        echo "Hidden Files Invisible"
        defaults write $pref FALSE;;
    !FALSE | !TRUE)
        echo "Error: Current value of $pref: $(evalpref)";;
esac

killall "Finder"

hidetoggle | Download Source | View Source