Clean up some mac cruft from zshrc, moved to zlocal
This commit is contained in:
parent
fae52151b1
commit
15e002ff2d
1 changed files with 2 additions and 35 deletions
37
zshrc
37
zshrc
|
|
@ -15,10 +15,6 @@ function is_interactive() { [ -t 1 ] }
|
||||||
# =======================
|
# =======================
|
||||||
# Do this before setting up PATH so ~/bin and similar still have the highest precedence.
|
# Do this before setting up PATH so ~/bin and similar still have the highest precedence.
|
||||||
|
|
||||||
if mac && [[ -x $HOME/homebrew/bin/brew ]]; then
|
|
||||||
eval "$($HOME/homebrew/bin/brew shellenv)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if command_exists rbenv; then
|
if command_exists rbenv; then
|
||||||
eval "$(rbenv init -)"
|
eval "$(rbenv init -)"
|
||||||
fi
|
fi
|
||||||
|
|
@ -41,11 +37,8 @@ fi
|
||||||
|
|
||||||
custom_paths=(
|
custom_paths=(
|
||||||
/sbin /usr/sbin
|
/sbin /usr/sbin
|
||||||
/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin
|
|
||||||
$HOME/Library/Android/sdk/platform-tools
|
|
||||||
$HOME/homebrew/Cellar/python@3.9/3.9.12/Frameworks/Python.framework/Versions/3.9/bin
|
|
||||||
$HOME/go/bin
|
|
||||||
/usr/local/bin /usr/local/sbin
|
/usr/local/bin /usr/local/sbin
|
||||||
|
$HOME/go/bin
|
||||||
$HOME/bin
|
$HOME/bin
|
||||||
)
|
)
|
||||||
for dir in $custom_paths; do
|
for dir in $custom_paths; do
|
||||||
|
|
@ -91,20 +84,6 @@ if mac; then
|
||||||
# Don't pollute tar archives with ._ files (Apple double files)
|
# Don't pollute tar archives with ._ files (Apple double files)
|
||||||
export COPYFILE_DISABLE=true
|
export COPYFILE_DISABLE=true
|
||||||
|
|
||||||
# Use Homebrew's OpenSSL to build Ruby
|
|
||||||
if [[ -d /usr/local/opt/openssl@1.1 ]]; then
|
|
||||||
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=/usr/local/opt/openssl@1.1"
|
|
||||||
fi
|
|
||||||
if [[ -d /opt/homebrew/opt/openssl@1.1 ]]; then
|
|
||||||
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=/opt/homebrew/opt/openssl@1.1"
|
|
||||||
fi
|
|
||||||
if [[ -d $HOME/homebrew/opt/openssl@1.1 ]]; then
|
|
||||||
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$HOME/homebrew/opt/openssl@1.1"
|
|
||||||
fi
|
|
||||||
if [[ -d $HOME/homebrew/opt/libpq/bin ]]; then
|
|
||||||
export PATH="$HOME/homebrew/opt/libpq/bin:$PATH"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set Apple Terminal.app resume directory
|
# Set Apple Terminal.app resume directory
|
||||||
if [[ $TERM_PROGRAM == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]] {
|
if [[ $TERM_PROGRAM == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]] {
|
||||||
function chpwd {
|
function chpwd {
|
||||||
|
|
@ -333,16 +312,4 @@ if command_exists brew; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
autoload -Uz compinit
|
autoload -Uz compinit
|
||||||
|
compinit
|
||||||
# Sharing Homebrew in /usr/local with multiple users on the same machine means
|
|
||||||
# that group writable files in /usr/local are deemed insecure. But I'm the only
|
|
||||||
# actual user so tell compinit not to bother me about compaudit's complaints.
|
|
||||||
is_group_writable() {
|
|
||||||
[[ -d "$1" ]] && [[ "${$(ls -ld "$1"):5:1}" = "w" ]]
|
|
||||||
}
|
|
||||||
if mac && is_group_writable /usr/local/share; then
|
|
||||||
compinit -u
|
|
||||||
else
|
|
||||||
compinit
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue