optimize usage

This commit is contained in:
major 2023-06-25 13:32:44 +08:00
commit 4ed23ee299
4 changed files with 50 additions and 6 deletions

View file

@ -360,8 +360,9 @@ setup_zshrc() {
fi
omz=$(echo "$omz" | sed "s|^$HOME/|\$HOME/|")
sed "s|^export ZSH=.*$|export ZSH=\"${omz}\"|" "$ZSH/templates/zshrc.zsh-template" > "$zdot/.zshrc-omztemp"
mv -f "$zdot/.zshrc-omztemp" "$zdot/.zshrc"
# sed "s|^export ZSH=.*$|export ZSH=\"${omz}\"|" "$ZSH/templates/zshrc.zsh-template" > "$zdot/.zshrc-omztemp"
# mv -f "$zdot/.zshrc-omztemp" "$zdot/.zshrc"
ln -sf "$ZSH/templates/zshrc.zsh-template" "$zdot/.zshrc"
echo
}