mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2025-12-06 07:20:40 +01:00
installer: restore previous default shell with uninstall
Co-authored-by: Antonio QUINTAVALLE <antonio.quintavalle@amadeus.com> Co-authored-by: Marc Cornellà <marc.cornella@live.com>
This commit is contained in:
committed by
Marc Cornellà
parent
66d6d08841
commit
2e54ba2dfb
@@ -184,6 +184,13 @@ setup_shell() {
|
||||
fi
|
||||
fi
|
||||
|
||||
# We're going to change the default shell, so back up the current one
|
||||
if [ -n $SHELL ]; then
|
||||
echo $SHELL > ~/.shell.pre-oh-my-zsh
|
||||
else
|
||||
grep "^$USER:" /etc/passwd | awk -F: '{print $7}' > ~/.shell.pre-oh-my-zsh
|
||||
fi
|
||||
|
||||
# Actually change the default shell to zsh
|
||||
if ! chsh -s "$zsh"; then
|
||||
error "chsh command unsuccessful. Change your default shell manually."
|
||||
|
||||
Reference in New Issue
Block a user