sorin-ionescu / prezto

The configuration framework for Zsh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

question about dir_color eval

LuanVSO opened this issue · comments

eval "$(dircolors --sh $HOME/.dir_colors(.N))"

whats the (.N) supposed to do in this line?
in my system it is preventing .dir_colors from being matched

(.N) is composition of two separate Glob Qualifiers.

  • . checks if $HOME/.dir_colors is a plain file.
  • N sets the NULL_GLOB option for $HOME/.dir_colors (In ZSH parlance, when NULL_GLOB is set, if a pattern for filename generation has no matches, delete the pattern from the argument list instead of reporting an error).

These two qualifiers together effectively means, if $HOME/.dir_colors doesn't exist as a plain text file, the line eval "$(dircolors --sh $HOME/.dir_colors(.N))" reduces to eval "$(dircolors --sh)" instead of eval "$(dircolors --sh $HOME/.dir_colors)".

Hope this helps troubleshooting further.

Thanks, my .dir_colors was a symlink to .dircolors