Modifying PATH with fish shell

后端 未结 5 812

I\'m currently playing around with the fish shell and I\'m having some trouble wrapping my head around how the PATH variable is set. For what it\'s worth, I\'m

5条回答
  •  情话喂你
    2020-12-12 13:29

    The recommended commands for modifying PATH from fish's maintainers are:

    1. If you want to run the command once:

      set -Ua fish_user_paths /path
      
    2. If you want to add a command to a startup script, this is idempotent:

       contains /path $fish_user_paths; or set -Ua fish_user_paths /path
      

提交回复
热议问题