Explain the issues of setting fish as login shell

Also stop explaining this in three places. In particular this removes
an FAQ entry.

Fixes #8078
This commit is contained in:
Fabian Homborg 2022-02-18 15:30:23 +01:00
parent d485ed3d87
commit 5af1e64441
4 changed files with 21 additions and 47 deletions

View file

@ -343,24 +343,6 @@ This also means that a few things are unsupportable:
- Non-monospace fonts - there is *no way* for fish to figure out what width a specific character has as it has no influence on the terminal's font rendering.
- Different widths for multiple ambiguous width characters - there is no way for fish to know which width you assign to each character.
How do I make fish my default shell?
------------------------------------
If you installed fish manually (e.g. by compiling it, not by using a package manager), you first need to add fish to the list of shells by executing the following command (assuming you installed fish in /usr/local)::
echo /usr/local/bin/fish | sudo tee -a /etc/shells
If you installed a prepackaged version of fish, the package manager should have already done this for you.
In order to change your default shell, type::
chsh -s /usr/local/bin/fish
You may need to adjust the above path to e.g. ``/usr/bin/fish``. Use the command ``which fish`` if you are unsure of where fish is installed.
Unfortunately, there is no way to make the changes take effect at once. You will need to log out and back in again.
.. _faq-uninstalling:
Uninstalling fish

View file

@ -56,15 +56,30 @@ Once fish has been installed, open a terminal. If fish is not the default shell:
> exit
.. _default-shell:
Default Shell
-------------
To make fish your default shell:
There are multiple ways to switch to fish (or any other shell) as your default.
- Add the line ``/usr/local/bin/fish`` to ``/etc/shells``.
- Change your default shell with ``chsh -s /usr/local/bin/fish``.
The simpler is to set your terminal to start fish. 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).
For detailed instructions see :ref:`Switching to fish <switching-to-fish>`.
The more involved and complete way is to set fish as your login shell. To do that, you need to:
1. Add the shell to ``/etc/shells`` with::
> echo /usr/local/bin/fish | sudo tee -a /etc/shells
2. Change your default shell with::
> chsh -s /usr/local/bin/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.
.. warning::
Setting fish as your login shell may have issues, because some operating systems (including a bunch of linux distributions) only do some of their configuration in shell startup files like /etc/profile. So you could notice e.g. $PATH being wrong, and you would have to redo that setup.
Uninstalling
------------

View file

@ -111,7 +111,7 @@ div.documentwrapper {
float: none;
}
div.document, div.body {
div.document, div.body, div.warning {
background-color: inherit;
color: inherit;
}

View file

@ -29,7 +29,7 @@ which means you are all set up and can start using fish::
This prompt that you see above is the fish default prompt: it shows your username, hostname, and working directory.
- to change this prompt see :ref:`how to change your prompt <prompt>`
- to switch to fish permanently see :ref:`switch your default shell to fish <switching-to-fish>`.
- to switch to fish permanently see :ref:`Default Shell <default-shell>`.
From now on, we'll pretend your prompt is just a ``>`` to save space.
@ -765,29 +765,6 @@ Now in another shell::
vim
.. _switching-to-fish:
Switching to fish?
------------------
If you wish to use fish (or any other shell) as your default shell,
you need to enter your new shell's executable in two places.
Add the shell to ``/etc/shells`` with::
> echo /usr/local/bin/fish | sudo tee -a /etc/shells
Change your default shell with::
> chsh -s /usr/local/bin/fish
This assumes you installed fish to /usr/local/bin, which is the default location when you've compiled it yourself. If you installed it with a package manager, the usual location is /usr/bin/fish, but package managers typically already add it to /etc/shells. Just substitute the correct location.
(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.)
Ready for more?
---------------