Last active
June 26, 2022 23:40
-
-
Save jbyman/a0084aabbe3eb927349c8a90164bec55 to your computer and use it in GitHub Desktop.
ZSHRC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PATH=$HOME/bin:/usr/local/bin:$PATH | |
export ZSH="/Users/jbyman/.oh-my-zsh" | |
plugins=( | |
git | |
macos | |
) | |
ZSH_THEME="jake" | |
source $ZSH/oh-my-zsh.sh | |
# | |
# Z | |
# | |
. ~/z.sh | |
# | |
# Aliases | |
# | |
alias sudo='sudo ' # So we can use aliases with sudo | |
alias ...="cd ..; cd .." | |
alias clean="clear && printf '\e[3J'" | |
alias clear="clear && printf '\e[3J'" | |
alias ls="ls -GFh" | |
alias oldfind='find' | |
alias find='NO_COLOR=1 fd -I' | |
alias finder="rg --no-ignore --files | fzf -i | xargs nvim -p" | |
alias vim='nvim -p' | |
alias prettier='npm run prettier' | |
alias snippets='cd /Users/jbyman/.vim/plugged/vim-snippets/snippets' | |
alias oldgrep="grep" | |
alias grep='rg' | |
alias local-db='psql -h localhost -U postgres global' | |
alias shuf='gshuf' | |
alias python='python3' | |
alias pip='pip3' | |
alias logs='tail -f ./local_logs/api' | |
alias ghpr='gh pr create' | |
alias big-red-button='docker-compose down; docker system prune; docker volume prune -f' | |
# | |
# Useful files | |
# | |
alias vimrc='vim ~/.config/nvim/init.vim' | |
alias nvimrc='vim ~/.config/nvim/init.vim' | |
alias bashrc='vim ~/.zshrc' | |
alias zshrc='vim ~/.zshrc' | |
alias bashprofile='vim ~/.zshrc' | |
# | |
# Variables | |
# | |
set -o vi | |
export PATH="/usr/local/sbin:$PATH" | |
export SSH_USER='jbyman' | |
export PARALLEL_SPLIT_TEST_PROCESSES=20 | |
export EDITOR=nvim | |
export PROMPT_COMMAND='echo -ne "\033]0;iTerm\007"' | |
unset MAILCHECK | |
# | |
# GOPATH | |
# | |
export GOPATH=$HOME/go | |
# | |
# Function definitions | |
# | |
tag(){ | |
ctags -R --exclude={.git,node_modules} &>/dev/null & | |
} | |
# | |
# Kill all on port | |
# | |
Killonport() | |
{ | |
sudo kill -9 $(sudo lsof -t -i:$1) | |
} | |
alias killonport='Killonport &>/dev/null' | |
# | |
# Clean swap files | |
# | |
Cleanswaps() | |
{ | |
(find "*.swp" | xargs rm) && (find "*.swn" | xargs rm) && (find "*.swl" | xargs rm) | |
} | |
alias cleanswaps='Cleanswaps' | |
# | |
# Git | |
# | |
alias gitfind='git log -u -G' | |
alias cleangit='git remote prune origin; git gc --aggressive --prune=all && git fsck && git prune' | |
# | |
# Reverse search | |
# | |
bindkey -v | |
bindkey '^r' history-incremental-search-backward | |
# | |
# FZF | |
# | |
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh | |
export FZF_DEFAULT_COMMAND='ag -g "" --ignore templates_c' | |
export FZF_CTRL_T_COMMAND=$FZF_DEFAULT_COMMAND | |
# | |
# Spongebobify | |
# | |
alias spongebobify='python ~/spongebobify.py' | |
if which ruby >/dev/null && which gem >/dev/null; then | |
PATH="$(ruby -r rubygems -e 'puts Gem.user_dir')/bin:$PATH" | |
fi | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm | |
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment