Skip to content

Instantly share code, notes, and snippets.

@KirillY
Created July 10, 2023 12:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KirillY/f722682efae7d088b130312a1e97f2f8 to your computer and use it in GitHub Desktop.
Save KirillY/f722682efae7d088b130312a1e97f2f8 to your computer and use it in GitHub Desktop.
zsh-spaceship public

Zsh general

Install zsh

sudo aptitude install zsh

Make zsh default shell

whereis zsh  # this usually returns /usr/bin/zsh
sudo usermod -s /usr/bin/zsh $(whoami)

Reboot linux, after this select 2 in the prompt

  • (2) Populate your .zshrc with configuration recommended

Install oh-my-zsh

sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

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
Add to ~/.zshrc (just copy entire .zshrc)

plugins=( [plugins...] zsh-syntax-highlighting)

Enable kubernetes autocomletion: add to .zshrc (just copy entire .zshrc)

source <(kubectl completion zsh)

Install fzf

Install fzf-tab - replace zsh default autocompletion (for cd)

git clone https://github.com/Aloxaf/fzf-tab ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-tab

Spaceship prompt plugin

Install spaceship plugin

git clone https://github.com/spaceship-prompt/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" --depth=1
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
Add to .zshrc (just copy entire .zshrc)

Set ZSH_THEME="spaceship" in your .zshrc

Rename context to make prompt shorter

kubectl config rename-context kirilllapshin-saas-dev.k8s.congenica.net saas-dev

Other references to configure .zshenv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment