2020-12-31 18:07:28 +08:00
|
|
|
#!/usr/bin/env zsh
|
2020-12-10 00:59:12 +08:00
|
|
|
|
2020-12-31 18:07:28 +08:00
|
|
|
# common grc.zsh paths
|
|
|
|
files=(
|
2023-09-13 22:31:24 +08:00
|
|
|
/etc/grc.zsh # default
|
|
|
|
/usr/local/etc/grc.zsh # homebrew darwin-x64
|
|
|
|
/opt/homebrew/etc/grc.zsh # homebrew darwin-arm64
|
2023-11-20 19:25:22 +08:00
|
|
|
/usr/share/grc/grc.zsh # Gentoo Linux (app-misc/grc)
|
2020-12-10 00:59:12 +08:00
|
|
|
)
|
|
|
|
|
2020-12-31 18:07:28 +08:00
|
|
|
# verify the file is readable and source it
|
|
|
|
for file in $files; do
|
|
|
|
if [[ -r "$file" ]]; then
|
|
|
|
source "$file"
|
|
|
|
break
|
2020-12-10 00:59:12 +08:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2020-12-31 18:07:28 +08:00
|
|
|
unset file files
|