config zsh

This commit is contained in:
2025-04-21 16:39:45 +08:00
parent 595ce5e8bb
commit 2b08d06733
6 changed files with 2014 additions and 51 deletions

17
zsh/config_ohmyzsh.sh Normal file
View File

@@ -0,0 +1,17 @@
#! /bin/bash
current_dir=$(dirname "$0")
# copying $HOME/.zshrc
if [ -f "$HOME/.zshrc" ]; then
if [ ! -f "$HOME/.zshrc.bkp" ]; then
mv "$HOME/.zshrc" "$HOME/.zshrc.bkp"
cp "$current_dir/zshrc" "$HOME/.zshrc"
else
echo "Backup file already exists. Please remove $HOME/.zshrc.bkp and try again."
exit 1
fi
else
cp "$current_dir/zshrc" "$HOME/.zshrc"
fi