Skip to content

Instantly share code, notes, and snippets.

@tjt263
Created January 23, 2018 11:06
Show Gist options
  • Save tjt263/4e154c610df3cb2ca6abb9f7c70eb818 to your computer and use it in GitHub Desktop.
Save tjt263/4e154c610df3cb2ca6abb9f7c70eb818 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
if showall=$(defaults read com.apple.finder AppleShowAllFiles) && [[ $showall = TRUE ]];
then defaults write com.apple.finder AppleShowAllFiles FALSE;
else defaults write com.apple.finder AppleShowAllFiles TRUE;
fi
killall Finder
####
#!/usr/bin/env bash
if [[ "$(defaults read com.apple.finder AppleShowAllFiles)" = "TRUE" ]];
then defaults write com.apple.finder AppleShowAllFiles FALSE;
else defaults write com.apple.finder AppleShowAllFiles TRUE;
fi
killall Finder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment