mirror of
https://github.com/alvinlollo/Single-install-script.git
synced 2026-06-18 04:26:25 +10:00
Install Oh-My-Zsh without exiting early
Reorder and uncomment backup and download commands for .zshrc and fzf configuration.
This commit is contained in:
@@ -36,6 +36,27 @@ echo '
|
|||||||
# Print commands
|
# Print commands
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
|
# Disable exit on error
|
||||||
|
set +eu
|
||||||
|
|
||||||
|
# Move existing oh-my-zsh installation
|
||||||
|
mv ~/.oh-my-zsh ~/oh-my-zsh-backup
|
||||||
|
|
||||||
|
# Enable exit on error
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
# Install oh-my-zsh without entering zsh
|
||||||
|
CHSH=no sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
|
||||||
|
|
||||||
|
# Install Oh-My-Zsh plugins
|
||||||
|
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
|
||||||
|
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|
||||||
|
git clone https://github.com/z-shell/zsh-eza ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-eza
|
||||||
|
git clone --depth 1 https://github.com/unixorn/fzf-zsh-plugin.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-zsh-plugin
|
||||||
|
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
|
||||||
|
|
||||||
|
# Enable exit on error
|
||||||
|
set -eu
|
||||||
|
|
||||||
# Backup old config file if it exists
|
# Backup old config file if it exists
|
||||||
cp .zshrc .zshrc.backup
|
cp .zshrc .zshrc.backup
|
||||||
@@ -50,26 +71,4 @@ curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/re
|
|||||||
mkdir -p ~/.fzf/shell
|
mkdir -p ~/.fzf/shell
|
||||||
touch ~/.fzf/shell/key-bindings.zsh
|
touch ~/.fzf/shell/key-bindings.zsh
|
||||||
|
|
||||||
# Disable exit on error
|
|
||||||
set +eu
|
|
||||||
|
|
||||||
# Move existing oh-my-zsh installation
|
|
||||||
mv ~/.oh-my-zsh ~/oh-my-zsh-backup
|
|
||||||
|
|
||||||
# Enable exit on error
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
# Install oh-my-zsh
|
|
||||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
|
||||||
|
|
||||||
# Install Oh-My-Zsh plugins
|
|
||||||
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
|
|
||||||
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|
|
||||||
git clone https://github.com/z-shell/zsh-eza ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-eza
|
|
||||||
git clone --depth 1 https://github.com/unixorn/fzf-zsh-plugin.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-zsh-plugin
|
|
||||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
|
|
||||||
|
|
||||||
# Enable exit on error
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
chsh -s $(which zsh)
|
chsh -s $(which zsh)
|
||||||
|
|||||||
Reference in New Issue
Block a user