mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-13 03:12:21 +01:00
Smoother way of changing default login shell back to bash
This commit is contained in:
parent
175b4a8073
commit
db3faa31b0
1 changed files with 18 additions and 3 deletions
|
|
@ -20,9 +20,24 @@ then
|
||||||
|
|
||||||
source ~/.zshrc;
|
source ~/.zshrc;
|
||||||
else
|
else
|
||||||
echo "Switching back to bash"
|
echo "Changing default login shell from zsh back to bash ... login required."
|
||||||
chsh -s /bin/bash
|
chsh -s /bin/bash
|
||||||
source /etc/profile
|
if [ "$?" = "0" ]; then
|
||||||
|
echo "Done. All new shell windows will be bash!"
|
||||||
|
printf "Replace this zsh window with a bash window right now? (yes/no): "
|
||||||
|
read CHOICE
|
||||||
|
if [ "$CHOICE" = "yes" ]; then
|
||||||
|
echo "OK, please login again below ... if something goes wrong you can \
|
||||||
|
always close this window and start a new bash window."
|
||||||
|
exec su - $USER
|
||||||
|
else
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Oops, something went wrong with the change to bash ... \
|
||||||
|
you can execute chsh -s /bin/bash manually and start a new window"
|
||||||
|
break
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Thanks for trying out Oh My Zsh. It's been uninstalled."
|
echo -e "\nThanks for trying out Oh My Zsh. It's been uninstalled."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue