mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-29 04:53:17 +02:00
Fix for #6299: restore previous default shell with uninstall
This commit is contained in:
parent
accdcb2f1c
commit
17b86257da
2 changed files with 7 additions and 0 deletions
|
|
@ -21,6 +21,12 @@ if [ -f ~/.zshrc.pre-oh-my-zsh ] || [ -h ~/.zshrc.pre-oh-my-zsh ]; then
|
|||
|
||||
mv ~/.zshrc.pre-oh-my-zsh ~/.zshrc;
|
||||
|
||||
if [ -f ~/.default-shell.pre-oh-my-zsh ] && hash chsh >/dev/null 2>&1; then
|
||||
previous=$(cat ~/.default-shell.pre-oh-my-zsh)
|
||||
echo "Switching your shell back to $previous"
|
||||
chsh -s $previous
|
||||
fi
|
||||
|
||||
echo "Your original zsh config was restored. Please restart your session."
|
||||
else
|
||||
if hash chsh >/dev/null 2>&1; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue