Skip to content

Instantly share code, notes, and snippets.

@wilcorrea
Last active January 29, 2025 21:51
Show Gist options
  • Save wilcorrea/b98908b62e5ae6e82869cef9f2bc151b to your computer and use it in GitHub Desktop.
Save wilcorrea/b98908b62e5ae6e82869cef9f2bc151b to your computer and use it in GitHub Desktop.
How to configure oh-my-szh + p10k
# ...
plugins=(
git
git-extras
screen
sudo
history
docker
docker-compose
colorize
command-not-found
zsh-completions
zsh-interactive-cd
## activate as make sense
# kubectl-autocomplete
# zsh-syntax-highlighting
# zsh-autosuggestions
)
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
source $ZSH/oh-my-zsh.sh
# ...
## Install oh-my-zsh
# https://ohmyz.sh/#install
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
## Install p10k
# https://github.com/romkatv/powerlevel10k?tab=readme-ov-file#oh-my-zsh
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k"
sed -i.bak 's~\(ZSH_THEME="\)[^"]*\(".*\)~\1powerlevel10k\/powerlevel10k\2~' ~/.zshrc
## Install kubectl-autocomplete
# requirements:
# - kubectl (brew install kubectl)
mkdir -p ~/.oh-my-zsh/custom/plugins/kubectl-autocomplete
kubectl completion zsh > ~/.oh-my-zsh/custom/plugins/kubectl-autocomplete/kubectl-autocomplete.plugin.zsh
## Install zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-syntax-highlighting
## Install zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment