Here shows how to add to
$PATH, for example.
All what to do is run this command:
$ set -x PATH <some-path> $PATH
--export) means it "causes the specified shell variable to be exported to child processes (making it an "environment variable")".
Fish shell has
.profile to other shells. Append this line to the bottom of it:
... + set PATH <some-path> $PATH
There is another and more "fisher" way. Use its
fish_user_paths, a universal variable of Fish shell.
Open your terminal and run this command:
$ set -U fish_user_paths <some-path> $fish_user_paths
--universal) means it "causes the specified shell variable to be given a universal scope".
Be careful not to write it in
config.fish, which is called every time Fish shell starts.