garabik/grc

zsh not sourcing the grc.zsh despite everything been set correctly

justkelvin opened this issue · 4 comments

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 romkatv/zsh4humans#218

There are two workarounds at the moment in that scenario:

  1. Source grc.zsh in your .zprofile file
  2. And according to @bkmo, edit grc.zsh and change

    grc/grc.zsh

    Line 3 in f4a579e

    if ! tty -s || [ ! -n "$TERM" ] || [ "$TERM" = dumb ] || (( ! $+commands[grc] ))
    to
    if [[ "$TERM" != dumb ]] && (( $+commands[grc] )) ; then
    and comment out

    grc/grc.zsh

    Line 95 in f4a579e

    unset cmds cmd

Not sure if this is your specific use case but the first workaround was fine for me.

bkmo commented

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 > romkatv/zsh4humans#218 (comment)

bkmo commented

Yes that is the best way to do it in my opinion.
z4h source /etc/grc.zsh <$TTY