-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Milestone
Description
As $PATH is special in fish someone at some point decided to add some protection so that if for example you do this set -x PATH "$PATH /opt/bin" Fish will suggest that you are doing this wrong and will not update the variable.
Below are some other creative ways of breaking the path in fish, it would probably be nice to warn against them as well. I guess as a rule of thumb you could always check if at least one entry in the array is a valid path (oddly enough in openSUSE the first entry in $PATH normally doesn't exist)
'# Presume $TMP contains "$PATH /usr/local/bin" echo $TMP | read -x PATH`
or
'set -x PATH $TMP'
set -x PATH FOO