zgen
zgen copied to clipboard
fpath "poluted" between users
Hi, I have a setup where I have both my normal and root user using a zsh configuration with zplug. I have noticed that when I switch users (su), I get the notorious "insecure directories" warning:
zsh compinit: insecure directories and files, run compaudit for list. Ignore insecure directories and files and continue [y] or abort compinit [n]?
I did some digging around and found this is because the "fpath" variable is "polluted" by the "normal users" zsh instance.
A minimal zshrc that reproduces the issue (I am using the 2.3.2 debian version)
source /usr/share/zplug/init.zsh zplug "zsh-users/zsh-syntax-highlighting", nice:10 zplug load
If I then do "echo $fpath" after zsh has started, it contains "
If I switch to root now ("su"), compinit gets executed (from the __zplug::core::core::prepare() function). Since fpath contains an "insecure" path (in the regular user home dir), it gives the above warning.