mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
parent
7304d82416
commit
f8fa69f817
1 changed files with 6 additions and 0 deletions
|
@ -581,6 +581,12 @@ To prepend /usr/local/bin and /usr/sbin to `$PATH`, you can write:
|
||||||
>_ set PATH /usr/local/bin /usr/sbin $PATH
|
>_ set PATH /usr/local/bin /usr/sbin $PATH
|
||||||
\endfish
|
\endfish
|
||||||
|
|
||||||
|
To remove /usr/local/bin from `$PATH`, you can write:
|
||||||
|
|
||||||
|
\fish{cli-dark}
|
||||||
|
>_ set PATH (string match -v /usr/local/bin $PATH)
|
||||||
|
\end{fish}
|
||||||
|
|
||||||
You can do so directly in `config.fish`, like you might do in other shells with `.profile`. See [this example](#path_example).
|
You can do so directly in `config.fish`, like you might do in other shells with `.profile`. See [this example](#path_example).
|
||||||
|
|
||||||
A faster way is to modify the `$fish_user_paths` [universal variable](#tut_universal), which is automatically prepended to `$PATH`. For example, to permanently add `/usr/local/bin` to your `$PATH`, you could write:
|
A faster way is to modify the `$fish_user_paths` [universal variable](#tut_universal), which is automatically prepended to `$PATH`. For example, to permanently add `/usr/local/bin` to your `$PATH`, you could write:
|
||||||
|
|
Loading…
Reference in a new issue