Created
June 11, 2022 23:23
-
-
Save dingwen07/1261eac531f7f080d72b78f931a8ca01 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Check if zsh is installed | |
if ! command -v zsh &> /dev/null | |
then | |
echo "zsh could not be found" | |
exit | |
fi | |
# Install oh-my-zsh unattended | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended | |
# Install zsh-autosuggestions | |
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions | |
# Install zsh-syntax-highlighting | |
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting | |
echo "" >> ~/.zshrc | |
echo "# Others" >> ~/.zshrc | |
echo "HISTSIZE=999999999" >> ~/.zshrc | |
echo "SAVEHIST=\$HISTSIZE" >> ~/.zshrc | |
echo "DEFAULT_USER=\$(whoami)" >> ~/.zshrc | |
echo "Done." | |
echo "Edit ~/.zshrc to enable plugins:" | |
echo "plugins=(\n git\n zsh-autosuggestions\n zsh-syntax-highlighting\n)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment