From 01f85f0f3736798d3de1df3b053e538f4323239e Mon Sep 17 00:00:00 2001 From: alvinlollo <143326475+alvinlollo@users.noreply.github.com> Date: Sat, 8 Nov 2025 23:11:51 +1100 Subject: [PATCH] Update zsh.sh to backup and configure zsh and fzf before oh my zsh install Backup the old .zshrc file, download new configuration files, and set up fzf. --- zsh.sh | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/zsh.sh b/zsh.sh index eba038d..cf0525a 100644 --- a/zsh.sh +++ b/zsh.sh @@ -36,6 +36,20 @@ echo ' # Print commands set -x + +# Backup old config file if it exists +cp .zshrc .zshrc.backup + +# Download and replace config file +curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/.zshrc -o ~/.zshrc + +# Download generic fzf configuration +curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/.fzf.zsh -o ~/.fzf.zsh + +# Setup fzf +mkdir -p ~/.fzf/shell +touch ~/.fzf/shell/key-bindings.zsh + # Disable exit on error set +eu @@ -57,21 +71,5 @@ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM: # Enable exit on error set -eu -set +x -echo ' - - --------------- Oh-My-zsh plugins --------------- - -' -set -x -# Backup old config file if it exists -cp .zshrc .zshrc.backup - -# Download and replace config file -curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/.zshrc -o ~/.zshrc - -# Setup fzf -mkdir -p ~/.fzf/shell -touch ~/.fzf/shell/key-bindings.zsh chsh -s $(which zsh)