grc
grc copied to clipboard
zsh not sourcing the grc.zsh despite everything been set correctly
zsh will not source the grc.zsh for some weird reason, when I paste the command in the prompt it is getting sourced, but not from my .zshrc file.
Are you using a Zsh plugin framework like zsh4humans? I had a very similar issue here https://github.com/romkatv/zsh4humans/issues/218
There are two workarounds at the moment in that scenario:
- Source
grc.zsh
in your .zprofile file - And according to @bkmo, edit
grc.zsh
and change https://github.com/garabik/grc/blob/f4a579e08d356a3ea00a8c6fda7de84fff5f676a/grc.zsh#L3 toif [[ "$TERM" != dumb ]] && (( $+commands[grc] )) ; then
and comment out https://github.com/garabik/grc/blob/f4a579e08d356a3ea00a8c6fda7de84fff5f676a/grc.zsh#L95
Not sure if this is your specific use case but the first workaround was fine for me.
I would suggest just creating a .zprofile and sourcing it there. No need to mod grc.zsh that way.
Also, this workaround from @romkatv if you are using zsh4humans > https://github.com/romkatv/zsh4humans/issues/218#issuecomment-1276387398
Yes that is the best way to do it in my opinion.
z4h source /etc/grc.zsh <$TTY