From 4f888d79ee07165c7072f98c7b3779de46c213f5 Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Tue, 5 Sep 2023 22:36:09 +0200 Subject: [PATCH] README: Do give the path dynamically in the switching instructions Apparently this is actually a point of confusion. Unfortunately we can't use `which` here because 1. it might not be installed, 2. it might be trash. So we give instructions from inside fish, and explain that they should *typically* work. See #10002 --- README.rst | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/README.rst b/README.rst index b02da5ad4..5649e4cfc 100644 --- a/README.rst +++ b/README.rst @@ -115,24 +115,21 @@ The following optional features also have specific requirements: Switching to fish ~~~~~~~~~~~~~~~~~ -If you wish to use fish as your default shell, use the following -command: +If you wish to use fish as your default shell, use the following command, from inside fish: :: - chsh -s /usr/local/bin/fish + chsh -s (command -s fish) -``chsh`` will prompt you for your password and change your default -shell. (Substitute ``/usr/local/bin/fish`` with whatever path fish was -installed to, if it differs.) Log out, then log in again for the changes -to take effect. +``chsh`` wants a full path, this will try to find where fish is installed. If that doesn't work, try to pass the path manually - it will usually be ``/usr/local/bin/fish`` if you built from source, or ``/usr/bin/fish`` if you installed a package. -Use the following command if fish isn’t already added to ``/etc/shells`` -to permit fish to be your login shell: +``chsh`` will prompt you for your password and change your default shell. Log out, then log in again for the changes to take effect. + +Use the following command if fish isn’t already added to ``/etc/shells`` to permit fish to be your login shell (e.g. if ``chsh`` complains that it "doesn't exist" or similar): :: - echo /usr/local/bin/fish | sudo tee -a /etc/shells + echo (command -s fish) | sudo tee -a /etc/shells To switch your default shell back, you can run ``chsh -s /bin/bash`` (substituting ``/bin/bash`` with ``/bin/tcsh`` or ``/bin/zsh`` as