From 7a49583f279ae1337bf00660d4304babe0cf7b1d Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Wed, 25 Oct 2017 16:34:17 -0500 Subject: [PATCH] Add instructions on appending to /etc/shells Print the command to append safely to /etc/shells with sudo and tee upon completion of `make install`. (cherry picked from commit 47993b48b65f3a22bc5e9a63177b7438b1a51568) --- Makefile.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index 8462a92f5..f97ad3a4c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -635,7 +635,8 @@ install: all install-force | check-legacy-binaries @echo @if type chsh >/dev/null 2>&1; then \ echo To use fish as your login shell:; \ - grep -q -- "$(DESTDIR)$(bindir)/fish" /etc/shells || echo \ \* add the line \'$(DESTDIR)$(bindir)/fish\' to the file \'/etc/shells\'; \ + grep -q -- "$(DESTDIR)$(bindir)/fish" /etc/shells || echo -e " * add the line '$(DESTDIR)$(bindir)/fish' to the file '/etc/shells':" \ + "\n echo '$(DESTDIR)$(bindir)/fish' | sudo tee -a /etc/shells > /dev/null"; \ echo " * run '$(yellow)chsh -s $(DESTDIR)$(bindir)/fish$(sgr0)'"; \ echo; \ fi;