Last active
January 23, 2025 14:07
-
-
Save zouguangxian/91df7eae10579b4cf5edeb14ccf882d4 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/sh | |
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended | |
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions | |
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting | |
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions | |
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k | |
sed -e 's/^plugins.*)/plugins=(git zsh-autosuggestions zsh-syntax-highlighting zsh-completions)/' -e 's,^ZSH_THEME=.*,ZSH_THEME="powerlevel10k/powerlevel10k",' -i '' ~/.zshrc | |
cp ~/.oh-my-zsh/custom/themes/powerlevel10k/config/p10k-lean.zsh ~/.p10k.zsh | |
sed -i '' -e '/^[ ]*newline.*$/d' -e 's/\(POWERLEVEL9K_PROMPT_ADD_NEWLINE\)=.*/\1=false/g' -e 's/\(POWERLEVEL9K_TRANSIENT_PROMPT\)=.*/\1=always/g' ~/.p10k.zsh | |
echo "[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh" >> ~/.zshrc | |
chsh -s $(command -v zsh) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
curl -o- https://gist.githubusercontent.com/zouguangxian/91df7eae10579b4cf5edeb14ccf882d4/raw/setup-for-zsh.sh | sh
wget -qO- https://gist.githubusercontent.com/zouguangxian/91df7eae10579b4cf5edeb14ccf882d4/raw/setup-for-zsh.sh | sh
curl -H 'Cache-Control: no-cache, no-store' -o- https://gist.githubusercontent.com/zouguangxian/91df7eae10579b4cf5edeb14ccf882d4/raw/setup-for-zsh.sh | sh