Skip to content

Instantly share code, notes, and snippets.

@de1o
Created March 2, 2015 15:47
Show Gist options
  • Save de1o/82790c0618643fe307b4 to your computer and use it in GitHub Desktop.
Save de1o/82790c0618643fe307b4 to your computer and use it in GitHub Desktop.
toggle showing all file on mac os x
# toggle showing all file on mac os x
toggle_hidden_dotfiles() {
local is_dotfiles_hidden=$(defaults read com.apple.finder AppleShowAllFiles)
if [[ $is_dotfiles_hidden == "No" ]]; then
defaults write com.apple.finder AppleShowAllFiles Yes && killall Finder
else
defaults write com.apple.finder AppleShowAllFiles No && killall Finder
fi
}
alias thide=toggle_hidden_dotfiles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment