0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

fishで環境変数を設定する方法

Last updated at Posted at 2023-08-23

設定方法

set -Ux FOO bar

-U はユニバーサル変数のことで PC 再起動をしても値を維持できるオプション。永続化するためのオプション。
-x は export のことで、環境変数を宣言するという意味のオプション。

config で永続化する方法

~/.config/fish/config.fish ファイルに次の行を追加。以下の例では $HOME/go/bin というパスを $PATH に追加してます。

set -x PATH $PATH $HOME/go/bin

削除方法

set -e FOO

-e は erase のことで、つまり環境変数を削除するという意味のオプション。

参考資料

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?