mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-02 05:41:16 -03:00
chsh docs: look up fish in $PATH instead of /usr/local/bin
Now that the « chsh -s $(command -v) » approach should work both in and outside fish, it seems like we should use that. Non-macOS users probably shouldn't do this, but there's already a big warning above this section. Fixes #11931
This commit is contained in:
@@ -63,7 +63,7 @@ Default Shell
|
||||
|
||||
There are multiple ways to switch to fish (or any other shell) as your default.
|
||||
|
||||
The simplest method is to set your terminal emulator (eg GNOME Terminal, Apple's Terminal.app, or Konsole) to start fish directly. See its configuration and set the program to start to ``/usr/local/bin/fish`` (if that's where fish is installed - substitute another location as appropriate).
|
||||
The simplest method is to set your terminal emulator (e.g. GNOME Terminal, Apple's Terminal.app, or Konsole) to start fish directly. See its configuration and set the program to start to ``/usr/local/bin/fish`` (the exact path depends on how you installed fish).
|
||||
|
||||
Alternatively, you can set fish as your login shell so that it will be started by all terminal logins, including SSH.
|
||||
|
||||
@@ -75,13 +75,13 @@ To change your login shell to fish:
|
||||
|
||||
1. Add the shell to ``/etc/shells`` with::
|
||||
|
||||
> echo /usr/local/bin/fish | sudo tee -a /etc/shells
|
||||
> command -v fish | sudo tee -a /etc/shells
|
||||
|
||||
2. Change your default shell with::
|
||||
|
||||
> chsh -s /usr/local/bin/fish
|
||||
> chsh -s "$(command -v fish)"
|
||||
|
||||
Again, substitute the path to fish for ``/usr/local/bin/fish`` - see ``command -s fish`` inside fish. To change it back to another shell, just substitute ``/usr/local/bin/fish`` with ``/bin/bash``, ``/bin/tcsh`` or ``/bin/zsh`` as appropriate in the steps above.
|
||||
To change it back to another shell, substitute ``fish`` with ``bash``, ``tcsh`` or ``zsh`` as appropriate in the above command.
|
||||
|
||||
Uninstalling
|
||||
------------
|
||||
|
||||
Reference in New Issue
Block a user