Skip to content

Instantly share code, notes, and snippets.

@ikrishagarwal
Last active June 7, 2024 05:13
Show Gist options
  • Save ikrishagarwal/d6a406d1b00bb637834c88a162bdbce6 to your computer and use it in GitHub Desktop.
Save ikrishagarwal/d6a406d1b00bb637834c88a162bdbce6 to your computer and use it in GitHub Desktop.
Setup starship, zsh suggestions and syntax highlight for your codespaces.

Setup ZSH

This gist will guide you through to setup starship along with zsh suggestions and zsh syntax highlight for your codespaces.

Table of Contents

This is an optional package if you want to beautify your terminal. Else you can also use any other ZSH themes.

Install starship

You cannot install starship in ZSH shell at the time of writing this. You can switch to bash.

curl -sS https://starship.rs/install.sh | sh

Setup the config in ZSH file

echo "eval \"\$(starship init zsh)\"" >> ${ZSOTDIR:-$HOME}/.zshrc
  1. Clone the repository
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions

You can change the path to anything you want. Here we use ~/.zsh/zsh-autosuggestions

  1. Add the invoke script to ZSH config
echo "source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ${ZSOTDIR:-$HOME}/.zshrc
  1. Clone the repository
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.zsh/zsh-syntax-highlighting
  1. Add the invoke script to ZSH config
echo "source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc

Note: If you see a Systemd in the terminal and you want to remove it. Then do:

mkdir -p ~/.config && printf "[container]\ndisabled = true" >> ~/.config/starship.toml

Voila! You are ready to use ZSH with Starship and ZSH Auto Suggestions and Syntax Highlighting.

If you like it consider following me on github

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