Skip to content

Instantly share code, notes, and snippets.

@guillaumecabanel
Last active February 17, 2025 08:35
Show Gist options
  • Select an option

  • Save guillaumecabanel/1c48d86012a3d695f52ea690ac240698 to your computer and use it in GitHub Desktop.

Select an option

Save guillaumecabanel/1c48d86012a3d695f52ea690ac240698 to your computer and use it in GitHub Desktop.
ZSH=$HOME/.oh-my-zsh
ZSH_THEME="robbyrussell"
plugins=(git gitfast last-working-dir common-aliases zsh-syntax-highlighting history-substring-search)
# Disable warning about insecure completion-dependent directories
ZSH_DISABLE_COMPFIX=true
# Actually load Oh-My-Zsh
source "${ZSH}/oh-my-zsh.sh"
unalias rm # No interactive rm by default (brought by plugins/common-aliases)
unalias lt # we need `lt` for https://github.com/localtunnel/localtunnel
# Rails and Ruby uses the local `bin` folder to store binstubs.
# So instead of running `bin/rails` like the doc says, just run `rails`
# Same for `./node_modules/.bin` and nodejs
export PATH="./bin:./node_modules/.bin:${PATH}:/usr/local/sbin"
export PATH="$HOME/.local/bin:$PATH"
# Store your own aliases in the ~/.aliases file and load the here.
[[ -f "$HOME/.aliases" ]] && source "$HOME/.aliases"
# Encoding stuff for the terminal
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
eval "$(mise activate zsh)"
sudo apt install -y zsh tree
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
CURRENT_DIR=`pwd`
ZSH_PLUGINS_DIR="$HOME/.oh-my-zsh/custom/plugins"
mkdir -p "$ZSH_PLUGINS_DIR" && cd "$ZSH_PLUGINS_DIR"
if [ ! -d "$ZSH_PLUGINS_DIR/zsh-syntax-highlighting" ]; then
  echo "-----> Installing zsh plugin 'zsh-syntax-highlighting'..."
  git clone https://github.com/zsh-users/zsh-autosuggestions
  git clone https://github.com/zsh-users/zsh-syntax-highlighting
fi
cd "$CURRENT_DIR"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment