feat(zinit): integrate zinit for improved shell configuration #1
@@ -1,10 +1,37 @@
|
|||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
export LOCAL_BIN="$HOME/.local/bin"
|
# Add GNU tools to PATH without 'g' prefix
|
||||||
if ! [ -d "$LOCAL_BIN" ]; then
|
local gnu_tools=(
|
||||||
mkdir -p "$LOCAL_BIN"
|
"coreutils"
|
||||||
fi
|
"findutils"
|
||||||
|
"gnu-tar"
|
||||||
|
"gnu-sed"
|
||||||
|
"gawk"
|
||||||
|
"gnu-indent"
|
||||||
|
"grep"
|
||||||
|
)
|
||||||
|
|
||||||
|
for tool in $gnu_tools; do
|
||||||
|
local gnubin="/opt/homebrew/opt/$tool/libexec/gnubin"
|
||||||
|
if [ -d "$gnubin" ]; then
|
||||||
case ":$PATH:" in
|
case ":$PATH:" in
|
||||||
*":$LOCAL_BIN:"*) ;;
|
*":$gnubin:"*) ;;
|
||||||
*) export PATH="$LOCAL_BIN:$PATH" ;;
|
*) export PATH="$gnubin:$PATH" ;;
|
||||||
esac
|
esac
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Add other bins separately since they have a different path structure
|
||||||
|
local bin_paths=(
|
||||||
|
"$HOME/.local/bin"
|
||||||
|
"/opt/homebrew/opt/gnu-getopt/bin"
|
||||||
|
)
|
||||||
|
for bin_path in $bin_paths; do
|
||||||
|
if [ -d "$bin_path" ]; then
|
||||||
|
case ":$PATH:" in
|
||||||
|
*":$bin_path:"*) ;;
|
||||||
|
*) export PATH="$bin_path:$PATH" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
Reference in new issue
Block a user