Skip to content

Instantly share code, notes, and snippets.

@aldegoeij
Created December 26, 2021 10:54
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 aldegoeij/552acd96ea8582062db4a925189238fd to your computer and use it in GitHub Desktop.
Save aldegoeij/552acd96ea8582062db4a925189238fd to your computer and use it in GitHub Desktop.
My `~/.zshrc` 😎
# Make sure you `brew install`:
# - zsh-autosuggestions
ZSH_THEME="robbyrussell"
source #{HOMEBREW_PREFIX}/share/zsh-autosuggestions/zsh-autosuggestions.zsh
plugins=(git zsh-autosuggestions web-search)
source $ZSH/oh-my-zsh.sh
alias python=python3
alias pip=pip3
# Python3
export VIRTUALENVWRAPPER_PYTHON=/opt/homebrew/bin/python3
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Projects
source /opt/homebrew/bin/virtualenvwrapper.sh
# direnv
_direnv_hook() {
trap -- '' SIGINT;
eval "$("/opt/homebrew/bin/direnv" export zsh)";
trap - SIGINT;
}
typeset -ag precmd_functions;
if [[ -z ${precmd_functions[(r)_direnv_hook]} ]]; then
precmd_functions=( _direnv_hook ${precmd_functions[@]} )
fi
typeset -ag chpwd_functions;
if [[ -z ${chpwd_functions[(r)_direnv_hook]} ]]; then
chpwd_functions=( _direnv_hook ${chpwd_functions[@]} )
fi
# OpenPGP SSH
## https://developer.okta.com/blog/2021/07/07/developers-guide-to-gpg#enable-your-gpg-key-for-ssh
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
gpgconf --launch gpg-agent
gpg-connect-agent /bye
export GPG_TTY=$(tty)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment