forked from ryanb/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef66694
commit c2bdefd
Showing
1 changed file
with
63 additions
and
79 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,39 @@ | ||
# Path to your oh-my-zsh installation. | ||
export ZSH=$HOME/.oh-my-zsh | ||
|
||
# Set name of the theme to load. | ||
# Look in ~/.oh-my-zsh/themes/ | ||
# Optionally, if you set this to "random", it'll load a random theme each | ||
# time that oh-my-zsh is loaded. | ||
# ZSH_THEME="avit" | ||
# ZSH_THEME="norm-hms" | ||
ZSH_THEME="refined" | ||
# ZSH_THEME="spaceship" | ||
|
||
# Example aliases | ||
# alias zshconfig="mate ~/.zshrc" | ||
# alias ohmyzsh="mate ~/.oh-my-zsh" | ||
|
||
# Uncomment the following line to use case-sensitive completion. | ||
# CASE_SENSITIVE="true" | ||
|
||
# Uncomment the following line to disable bi-weekly auto-update checks. | ||
# DISABLE_AUTO_UPDATE="true" | ||
|
||
# Uncomment the following line to change how often to auto-update (in days). | ||
# export UPDATE_ZSH_DAYS=13 | ||
|
||
# Uncomment the following line to disable colors in ls. | ||
# DISABLE_LS_COLORS="true" | ||
|
||
# Uncomment the following line to disable auto-setting terminal title. | ||
# DISABLE_AUTO_TITLE="true" | ||
|
||
# Uncomment the following line to disable command auto-correction. | ||
# DISABLE_CORRECTION="true" | ||
|
||
# Uncomment the following line to display red dots whilst waiting for completion. | ||
COMPLETION_WAITING_DOTS="true" | ||
|
||
# Uncomment the following line if you want to disable marking untracked files | ||
# under VCS as dirty. This makes repository status check for large repositories | ||
# much, much faster. | ||
# DISABLE_UNTRACKED_FILES_DIRTY="true" | ||
|
||
# Uncomment the following line if you want to change the command execution time | ||
# stamp shown in the history command output. | ||
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" | ||
# HIST_STAMPS="mm/dd/yyyy" | ||
|
||
# Would you like to use another custom folder than $ZSH/custom? | ||
# ZSH_CUSTOM=/path/to/new-custom-folder | ||
|
||
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) | ||
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ | ||
# Example format: plugins=(rails git textmate ruby lighthouse) | ||
# plugins=(git rails rsync heroku rake bundler brew themes rbenv) | ||
plugins=(git rails ruby rsync heroku brew themes rbenv iterm2 zsh-autosuggestions) | ||
|
||
plugins=( | ||
git | ||
rails ruby | ||
rsync | ||
heroku | ||
brew | ||
themes | ||
iterm2 | ||
zsh-autosuggestions | ||
zsh-fzf-history-search | ||
) | ||
|
||
source $ZSH/oh-my-zsh.sh | ||
|
||
autoload -U promptinit; promptinit | ||
# autoload -U promptinit; promptinit | ||
# prompt refined | ||
|
||
# color=[38;5;23m] | ||
# export PROMPT="%F{color%(1j. %j .)$PROMPT" | ||
|
||
# show bg jobs in prompt | ||
export PROMPT="%(1j. %j .)$PROMPT" | ||
# eval "$(starship init zsh)" | ||
|
||
# User configuration | ||
|
||
|
@@ -73,30 +42,29 @@ export PATH="$HOME/.yarn/bin:$PATH" | |
export PATH=$PATH:/usr/local/Cellar/gettext/0.20.1/bin | ||
|
||
export LC_ALL=en_US.UTF-8 | ||
|
||
# You may need to manually set your language environment | ||
# export LANG=en_US.UTF-8 | ||
export LANG=en_US.UTF-8 | ||
|
||
# Preferred editor for local and remote sessions | ||
alias vim="/usr/local/bin/vim" | ||
export EDITOR='vim' | ||
|
||
# Compilation flags | ||
# export ARCHFLAGS="-arch x86_64" | ||
|
||
eval "$(direnv hook zsh)" | ||
|
||
alias e="$EDITOR" | ||
alias v="view" | ||
alias o='open' | ||
alias l=exa | ||
alias b=bat | ||
|
||
alias myd='ssh myd' | ||
alias reload='. ~/.zshrc' | ||
|
||
alias pg_ctl@14='/usr/local/opt/postgresql@14/bin/pg_ctl' | ||
alias pg_ctl-local='pg_ctl@14 -D /usr/local/var/postgres-local -l /usr/local/var/postgres/server.log start' | ||
alias pg.start='pg_ctl@14 -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start' | ||
alias pg.stop='pg_ctl@14 -D /usr/local/var/postgres stop -s -m fast' | ||
|
||
# export BAT_THEME=ansi | ||
export BAT_STYLE=plain | ||
|
||
alias serve='python -m SimpleHTTPServer 8000' | ||
alias r='bin/rails' | ||
alias transmit='open -a Transmit' | ||
|
@@ -129,50 +97,66 @@ alias de='docker compose exec' | |
alias dcu='docker compose up' | ||
alias dcd='docker compose down' | ||
alias docker-prune='docker container prune && docker images prune && docker system prune' | ||
rebuild() { | ||
docker compose stop $1 | ||
docker compose build $1 | ||
docker compose up $1 | ||
} | ||
|
||
alias f='fg %-' | ||
|
||
# django | ||
m() { PYTHONIOENCODING=utf8 fab manage:"$*" } | ||
mt() { m test,"--failfast,--keepdb,--debug-mode,--noinput,$*" } | ||
|
||
alias ml='scripts/manage_local.sh' | ||
mtl() { ml test --failfast --keepdb --debug-mode --noinput $* } | ||
|
||
alias ms='fab server' | ||
alias mc='m shell_plus --print-sql' | ||
mt() { m test,"--failfast,--keepdb,--debug-mode,--noinput,$*" } | ||
# alias mt='fab test' | ||
|
||
rebuild() { | ||
docker compose stop $1 | ||
docker compose build $1 | ||
docker compose up $1 | ||
} | ||
# work | ||
alias ae='pyenv activate allears && cd ~/Projects/AllEars/allears' | ||
alias isort='isort --profile black' | ||
|
||
|
||
alias j='jobs' | ||
alias f='fg %-' | ||
alias hosts='sudo $EDITOR /etc/hosts' | ||
alias json_ppy='python -m json.tool' | ||
alias search='find . -iname' | ||
|
||
function xc { | ||
open "`ls -d *.xcworkspace *.xcodeproj | sort -r | head -1`" | ||
} | ||
|
||
function dropbox { | ||
p=$(pwd -P) | ||
[[ "$p" == *"$HOME/Dropbox"* ]] && open ${p/$HOME\/Dropbox/https:\/\/www.dropbox.com\/home} | ||
} | ||
alias xml_pp='xmllint --format -' | ||
|
||
export SHELL=/bin/zsh | ||
|
||
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh | ||
eval "$(rbenv init -)" | ||
# eval "$(pyenv init -)" | ||
if [[ -e '/opt/homebrew' ]]; then | ||
eval "$(/opt/homebrew/bin/brew shellenv)" | ||
else | ||
eval "$(/usr/local/Homebrew/bin/brew shellenv)" | ||
fi | ||
|
||
function flash_cache { | ||
sudo dscacheutil -flushcache | ||
sudo killall -HUP mDNSResponder | ||
} | ||
|
||
alias xml_pp='xmllint --format -' | ||
# Python + pyenv | ||
if command -v pyenv > /dev/null; then | ||
export PYENV_ROOT="$HOME/.pyenv" | ||
export PATH="$PYENV_ROOT/bin:$PATH" | ||
export PYENV_VIRTUALENV_DISABLE_PROMPT=1 | ||
|
||
eval "$(pyenv init --path)" | ||
eval "$(pyenv init -)" | ||
eval "$(pyenv virtualenv-init -)" | ||
fi | ||
|
||
if command -v rbenv > /dev/null; then | ||
eval "$(rbenv init - zsh)" | ||
fi | ||
|
||
eval "$(direnv hook zsh)" | ||
|
||
test -e ${HOME}/.iterm2_shell_integration.zsh && source ${HOME}/.iterm2_shell_integration.zsh | ||
|
||
# export PATH="/usr/local/opt/[email protected]/bin:$PATH" | ||
# export PATH="$HOME/Library/Python/2.7/bin:$PATH" | ||
export PATH="/usr/local/opt/[email protected]/bin:$PATH" | ||
# export PATH="/usr/local/opt/[email protected]/bin:$PATH" | ||
|
||
# Must be last | ||
source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh | ||
export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH" |