how to set environment variables in fish shell

后端 未结 4 1251
一向
一向 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:44

    another option is to run:

    export (cat env_file.txt |xargs -L 1)
    

    where env_file.txt contains rows of the format VAR=VALUE

    this has the benefit of keeping the variables in a format supported by other shells and tools

提交回复
热议问题