Skip to content

Instantly share code, notes, and snippets.

@martinbuberl
Last active March 27, 2025 10:44
Show Gist options
  • Save martinbuberl/a6fa5568d178365dfb6d117a0da8fe07 to your computer and use it in GitHub Desktop.
Save martinbuberl/a6fa5568d178365dfb6d117a0da8fe07 to your computer and use it in GitHub Desktop.
Latest Zsh Profile File (~/.zshrc)
printf "\33c\e[3J" # clear terminal (removes "Last login" message)
echo ".zshrc loaded ..."
# Homebrew
eval "$(/opt/homebrew/bin/brew shellenv)" # add Homebrew to $PATH
# enables tab completion for Terraform
# usually the command "terraform -install-autocomplete" adds the following lines,
# but on Apple Silicon it errored with "complete:13: command not found: compdef";
# the workaround is to also add the line "autoload -U +X compinit && compinit";
# see https://stackoverflow.com/a/76476988/135441
autoload -U +X compinit && compinit # initialize completion for the session
autoload -U +X bashcompinit && bashcompinit
complete -o nospace -C /opt/homebrew/bin/terraform terraform
# asdf
. /opt/homebrew/opt/asdf/libexec/asdf.sh # load asdf (installed via Homebrew)
# pnpm
export PATH=$(npm root -g)/corepack/shims:$PATH
# add "cursor" command (Cursor IDE)
# to launch Cursor from the command line, open the Command Palette (Command+Shift+P)
# and run the "install 'cursor' command";
# shortens the promt prompt from "username@computer ~ %" to "~ $"
export PS1="%~ $ "
# removes duplicates in $PATH
typeset -U path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment