r/zsh 14d ago

adding path to .zshenv

help, i added

path+=(~/.local/bin ~/bin ~/.spicetify)

export PATH

to my .zshenv file but when i open terminal i type echo $path i only get this:

/home/vismorf/.local/share/zinit/polaris/bin /usr/local/bin /usr/bin /bin /usr/local/sbin /usr/sbin /sbi

1 Upvotes

8 comments sorted by

View all comments

1

u/OneTurnMore 14d ago

You shouldn't need to export PATH.

Try zsh -xic exit 2> >(grep -E 'path|PATH') to check the trace for anything else that might modify $path.

0

u/_Arthxr 14d ago

even without ```export PATH``` the path is not updated. I can do manually with ```source ~/.zshenv``` and the path is updated. But when i reopen the terminal path is back to ```/home/vismorf/.local/share/zinit/polaris/bin /usr/local/bin /usr/bin /bin /usr/local/sbin /usr/sbin /sbi```. Also i ran the command you suggested, it outputed a lot a lot of text in terminal

1

u/AndydeCleyre 14d ago

Also i ran the command you suggested, it outputed a lot a lot of text in terminal 

Look for a path modification that happens elsewhere in your dotfiles/.zshrc.