diff --git a/zsh/func/init-rc-darwin b/zsh/func/init-rc-darwin new file mode 100644 index 0000000..f578c2c --- /dev/null +++ b/zsh/func/init-rc-darwin @@ -0,0 +1,39 @@ +#!/usr/bin/env zsh +# Eryn Wells + +autoload -Uz binary_exists + +function init-rc-darwin +{ + alias acls='command ls -le' + + # These things might have been installed by Homebrew, and I like the GNU + # versions better. + binary_exists gdircolors && alias dircolors='gdircolors' + binary_exists gfind && alias find='gfind' + binary_exists gnuindent && alias indent='gnuindent' + + binary_exists gls && init_rc_configure_ls `which gls` + + # ldd doesn't exist on OS X, but otool -L does the same thing. + alias ldd='otool -L' + + # From macOS's system zshrc. + # Disable the log builtin, so we don't conflict with /usr/bin/log + disable log + + local sounds=/System/Library/Sounds + alias glass="afplay $sounds/Glass.aiff" + alias funk="afplay $sounds/Funk.aiff" + + autoload -Uz darwin_init_once + autoload -Uz darwin-icloud-drive-path + autoload -Uz darwin_configure_screenshots_directory + autoload -Uz finder + + alias -s app='open' + alias -s xcodeproj='open-xcode' + alias -s xcworkspace='open-xcode' +} + +init-rc-darwin "$@" diff --git a/zsh/func/init_rc_darwin b/zsh/func/init_rc_darwin deleted file mode 100644 index 308a1fa..0000000 --- a/zsh/func/init_rc_darwin +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env zsh -# Eryn Wells - -autoload -Uz binary_exists - -alias acls='command ls -le' - -# These things might have been installed by Homebrew, and I like the GNU -# versions better. -binary_exists gdircolors && alias dircolors='gdircolors' -binary_exists gfind && alias find='gfind' -binary_exists gnuindent && alias indent='gnuindent' - -binary_exists gls && init_rc_configure_ls `which gls` - -# ldd doesn't exist on OS X, but otool -L does the same thing. -alias ldd='otool -L' - -# From macOS's system zshrc. -# Disable the log builtin, so we don't conflict with /usr/bin/log -disable log - -local sounds=/System/Library/Sounds -alias glass="afplay $sounds/Glass.aiff" -alias funk="afplay $sounds/Funk.aiff" - -autoload -Uz darwin_init_once -autoload -Uz darwin-icloud-drive-path -autoload -Uz darwin_configure_screenshots_directory - -# Open a file or folder in Finder. -function finder { - if [[ -z "$1" ]]; then - open -R . - fi - - open -R "$1" -} - -alias -s app='open' -alias -s xcodeproj='open-xcode' -alias -s xcworkspace='open-xcode' diff --git a/zshrc b/zshrc index 9b0e149..ce0e2c1 100644 --- a/zshrc +++ b/zshrc @@ -11,7 +11,7 @@ zsh_init_rc_functions=( \ init_zsh_options \ init_zsh_history \ init_app_environments \ - init_rc_$SYS \ + init-rc-$SYS \ ) if [[ -o LOGIN ]]; then