grc.plugin.zsh
462 bytes
1#!/usr/bin/env zsh
2
3# common grc.zsh paths
4files=(
5 /etc/grc.zsh # default
6 /usr/local/etc/grc.zsh # homebrew darwin-x64
7 /opt/homebrew/etc/grc.zsh # homebrew darwin-arm64
8 /home/linuxbrew/.linuxbrew/etc/grc.zsh # linuxbrew
9 /usr/share/grc/grc.zsh # Gentoo Linux (app-misc/grc)
10)
11
12# verify the file is readable and source it
13for file in $files; do
14 if [[ -r "$file" ]]; then
15 source "$file"
16 break
17 fi
18done
19
20unset file files