Skip to content

Instantly share code, notes, and snippets.

@exanup
Last active December 29, 2021 15:05
Show Gist options
  • Save exanup/57deca6d0d2579f47f10175cac9d6f82 to your computer and use it in GitHub Desktop.
Save exanup/57deca6d0d2579f47f10175cac9d6f82 to your computer and use it in GitHub Desktop.
Dotfiles zshrc
# This file is supposed to reside in ~/dotfiles/zshrc
# and sourced from ~/.zshrc as `. ~/dotfiles/zshrc`
# For Windows WSL 2
cd ~
export GPG_TTY=$(tty)
export PIPENV_VENV_IN_PROJECT=1
# Next line only for forwarding Homebrew to WSL2 Ubuntu
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
eval "$(fnm env --use-on-cd)"
eval "$(rbenv init -)"
eval "$(direnv hook zsh)"
export PATH=$HOME/bin:/usr/local/bin:/usr/local/sbin:$PATH
ZSH_THEME="ys"
plugins=(
git
# dotenv
# autojump
docker
docker-compose
)
. $ZSH/oh-my-zsh.sh
# Ubuntu
[ -f /usr/share/autojump/autojump.sh ] && . /usr/share/autojump/autojump.sh
# Mac OS (Homebrew)
[ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh
export LANG=en_US.UTF-8
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vim'
export VISUAL='vim'
else
# export EDITOR='nvim'
# export VISUAL='nvim'
export EDITOR='code -w'
export VISUAL='code -w'
fi
alias gitp="git config --global core.sshCommand \"ssh -F ~/.ssh/config-personal\" && \
git config --global user.email [email protected] && \
git config --global user.name \"My Name\" && \
git config --global commit.gpgsign true && \
git config --global user.signingkey XXXXXXXXXXXXXXXX && \
echo \"Switched git to personal profile\""
alias gitw="git config --global core.sshCommand \"ssh -F ~/.ssh/config-work\" && \
git config --global user.email [email protected] && \
git config --global user.name \"My Name\" && \
git config --global commit.gpgsign true && \
git config --global user.signingkey XXXXXXXXXXXXXXXX && \
echo \"Switched git to work profile\""
alias glog='git log --graph --pretty=format:'\''%Cred%h%Creset -%C(bold yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'\'' --abbrev-commit'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment