Skip to content

Commit

Permalink
Merge pull request #272 from himkt/homebrew-check
Browse files Browse the repository at this point in the history
misc(zsh): check command availability with path
  • Loading branch information
himkt authored Dec 16, 2024
2 parents 8f7c128 + 6ac14b5 commit b77796f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions zsh/config.d/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,20 @@ if command -v brew > /dev/null; then
export HOMEBREW_NO_AUTO_UPDATE=1
eval $(brew shellenv)

if [ "$(brew --prefix xz 2>/dev/null)" != "" ]; then
if [ -d "$HOMEBREW_ROOT/opt/xz" ]; then
export CONFIGURE_OPTS="--enable-shared"
export CPPFLAGS="-I$(brew --prefix xz)/include"
export LDFLAGS="-L$(brew --prefix xz)/lib"
fi

if [ "$(brew --prefix openjdk 2>/dev/null)" != "" ]; then
if [ -d "$HOMEBREW_ROOT/opt/openjdk" ]; then
export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"
export CPPFLAGS="$CPPFLAGS:-I/opt/homebrew/opt/openjdk/include"
fi

if [ -d "$HOMEBREW_ROOT/opt/libpq/bin" ]; then
export PATH="/opt/homebrew/opt/libpq/bin:$PATH"
fi
fi

export PYTHONSYSTEMPATH=$(which python3)
Expand Down Expand Up @@ -238,8 +242,8 @@ if command -v fzf > /dev/null; then
source <(fzf --zsh)
fi

# NOTE; atuin should be loaded after fzf since both modifies ctrl-r behavior.
if command -v atuin > /dev/null; then
# NOTE; atuin should be loaded after fzf since both modifies ctrl-r behavior.
eval "$(atuin init zsh --disable-up-arrow)"
fi

Expand Down

0 comments on commit b77796f

Please sign in to comment.