how to set environment variables in fish shell

后端 未结 4 1255
一向
一向 2021-01-30 07:59

Can someone please tell me what\'s the correct way to set a bunch of environment variables in the fish shell?

In my .config/fish/config.fish file, I have a function to s

4条回答
  •  走了就别回头了
    2021-01-30 08:32

    The variables you are declaring are keep in a local scope inside your function.

    Use:

    set -g -x
    

    Here "g" is for global.

提交回复
热议问题