1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2026-01-23 01:17:24 +08:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Xscriptor
64697e4d47
Merge 9000e673cd into 1b4497fc8f 2025-12-06 23:41:44 -08:00
xscriptorcode
9000e673cd fix(uninstall): keep ~/.zshrc if no backup exists 2025-09-17 21:21:26 +02:00

View File

@ -22,9 +22,14 @@ if [ -d ~/.oh-my-zsh ]; then
fi
if [ -e ~/.zshrc ]; then
ZSHRC_SAVE=~/.zshrc.omz-uninstalled-$(date +%Y-%m-%d_%H-%M-%S)
echo "Found ~/.zshrc -- Renaming to ${ZSHRC_SAVE}"
mv ~/.zshrc "${ZSHRC_SAVE}"
ZSHRC_ORIG=~/.zshrc.pre-oh-my-zsh
if [ -e "$ZSHRC_ORIG" ]; then
ZSHRC_SAVE=~/.zshrc.omz-uninstalled-$(date +%Y-%m-%d_%H-%M-%S)
echo "Found ~/.zshrc -- Renaming to ${ZSHRC_SAVE}"
mv ~/.zshrc "${ZSHRC_SAVE}"
else
echo "Found ~/.zshrc but no backup config detected -- leaving it untouched"
fi
fi
echo "Looking for original zsh config..."