1 | initial version |
Open Terminal and launch Fish Shell by typing fish
.
Type set -x PATH /path/to/your/directory:$PATH
to set the path to the directory where the exports file is located. Replace /path/to/your/directory
with the actual path to the directory.
Type cd /path/to/your/directory
to navigate to the directory, where the exports file is located.
Create a new file named .exports
by typing touch .exports
.
Open the .exports
file in a text editor, e.g. nano
or vim
.
Add your exports using the export
command, followed by the variable name and its value. Here's an example:
export MY_VAR="Hello World"
export PATH="/usr/local/bin:$PATH"
Save the file and exit the text editor.
Type source ~/.config/fish/config.fish
to reload Fish Shell's configuration file.
Type echo $MY_VAR
to verify that the variable has been exported successfully.
Congratulations, you have successfully configured exports in Fish Shell!