unixorn/tumult.plugin.zsh

View on GitHub
bin/show-dotfiles

Summary

Maintainability
Test Coverage
#!/usr/bin/env bash
#
# Hide dotfiles in Finder
#
# Copyright 2021, Joe Block <jpb@unixorn.net>
# License: Apache 2

set -o pipefail

if [[ -n "$DEBUG" ]]; then
  set -x
fi

if [[ "$(uname -s)" != 'Darwin' ]]; then
  echo 'Sorry, this script only works on macOS'
  exit 1
fi

defaults write com.apple.Finder AppleShowAllFiles -bool false && killall Finder