From 5af1e6444160de6a1cc63fffe25037cbde93198e Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Fri, 18 Feb 2022 15:30:23 +0100 Subject: [PATCH] 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 --- doc_src/faq.rst | 18 ------------- doc_src/index.rst | 23 ++++++++++++++--- .../python_docs_theme/static/pydoctheme.css | 2 +- doc_src/tutorial.rst | 25 +------------------ 4 files changed, 21 insertions(+), 47 deletions(-) diff --git a/doc_src/faq.rst b/doc_src/faq.rst index 6b31d03fb..1fbe536a0 100644 --- a/doc_src/faq.rst +++ b/doc_src/faq.rst @@ -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 diff --git a/doc_src/index.rst b/doc_src/index.rst index e61f74746..9232f215f 100644 --- a/doc_src/index.rst +++ b/doc_src/index.rst @@ -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 `. +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 ------------ diff --git a/doc_src/python_docs_theme/static/pydoctheme.css b/doc_src/python_docs_theme/static/pydoctheme.css index 8cc9cb8b1..f34217dad 100644 --- a/doc_src/python_docs_theme/static/pydoctheme.css +++ b/doc_src/python_docs_theme/static/pydoctheme.css @@ -111,7 +111,7 @@ div.documentwrapper { float: none; } -div.document, div.body { +div.document, div.body, div.warning { background-color: inherit; color: inherit; } diff --git a/doc_src/tutorial.rst b/doc_src/tutorial.rst index 4fdc05718..cbab7ed55 100644 --- a/doc_src/tutorial.rst +++ b/doc_src/tutorial.rst @@ -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 ` -- to switch to fish permanently see :ref:`switch your default shell to fish `. +- to switch to fish permanently see :ref:`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? ---------------