1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-24 23:00:09 +00:00
ohmyzsh/plugins/grc/grc.plugin.zsh
nexpspace 6165c257ae
fix(grc): source grc.zsh on gentoo (#12050)
Co-authored-by: mphi <mphi@norealmail.fdfe.de>
Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
2023-11-20 11:25:22 +00:00

19 lines
408 B
Bash

#!/usr/bin/env zsh
# common grc.zsh paths
files=(
/etc/grc.zsh # default
/usr/local/etc/grc.zsh # homebrew darwin-x64
/opt/homebrew/etc/grc.zsh # homebrew darwin-arm64
/usr/share/grc/grc.zsh # Gentoo Linux (app-misc/grc)
)
# verify the file is readable and source it
for file in $files; do
if [[ -r "$file" ]]; then
source "$file"
break
fi
done
unset file files