aboutsummaryrefslogtreecommitdiffstats
path: root/zsh
diff options
context:
space:
mode:
authorjason2019-07-08 11:06:27 -0600
committerjason2019-07-08 11:06:27 -0600
commit15289567d1d5a27e7aba219aa0bfc13b32d8cb68 (patch)
tree4ea62fa9ae77ace2baa539a8dd27623e6e9805c9 /zsh
parent97322f1510b97561e353aa5adb90458c02453e0f (diff)
downloaddotfiles-15289567d1d5a27e7aba219aa0bfc13b32d8cb68.tar.gz
dotfiles-15289567d1d5a27e7aba219aa0bfc13b32d8cb68.zip
zsh update
Diffstat (limited to 'zsh')
-rw-r--r--zsh/.zshrc71
1 files changed, 48 insertions, 23 deletions
diff --git a/zsh/.zshrc b/zsh/.zshrc
index f0d1f10..ec8b151 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -53,24 +53,28 @@ plugins=(git git-extras docker fabric gpg-agent pep8 pip pyenv pylint python vag
53ZSH=~/.oh-my-zsh 53ZSH=~/.oh-my-zsh
54 54
55source $ZSH/oh-my-zsh.sh 55source $ZSH/oh-my-zsh.sh
56export LANG=en_US.UTF-8
57export MANPATH="/usr/local/man:$MANPATH"
56 58
57# maybe this stuff should go in .profile. Emacs seems to read from that 59# PATH setup
58export RUST_SRC_PATH="$HOME/Code/rust-lang/src"
59if [ -f $HOME/.cargo/env ]; then
60 source $HOME/.cargo/env
61fi
62
63export GOROOT=/usr/local/go/
64export GOPATH=$HOME/Code/go
65
66export PATH="$HOME/bin:$HOME/.cargo/bin:/usr/local/go/bin/:$PATH" 60export PATH="$HOME/bin:$HOME/.cargo/bin:/usr/local/go/bin/:$PATH"
67if [ -f /usr/local/go/bin/go ]; then 61if [ -f /usr/local/go/bin/go ]; then
68 export PATH="$PATH:$GOROOT/bin:$(go env GOPATH)/bin" 62 export PATH="$PATH:$GOROOT/bin:$(go env GOPATH)/bin"
69fi 63fi
70 64
71export MANPATH="/usr/local/man:$MANPATH" 65# Rust
66if [ -f $HOME/.cargo/env ]; then
67 source $HOME/.cargo/env
68fi
72 69
73export LANG=en_US.UTF-8 70# maybe this stuff should go in .profile. Emacs seems to read from that
71if [ -x $HOME/.cargo/bin/rustup ]; then
72 export RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/src"
73fi
74
75# Golang
76#export GOROOT=/usr/local/go/
77#export GOPATH=$HOME/Code/go
74 78
75# Preferred editor for local and remote sessions 79# Preferred editor for local and remote sessions
76# if [[ -n $SSH_CONNECTION ]]; then 80# if [[ -n $SSH_CONNECTION ]]; then
@@ -79,7 +83,8 @@ export LANG=en_US.UTF-8
79# export EDITOR='mvim' 83# export EDITOR='mvim'
80# fi 84# fi
81#export EDITOR='/Applications/Emacs\ 25.app/Contents/MacOS/bin/emacsclient' 85#export EDITOR='/Applications/Emacs\ 25.app/Contents/MacOS/bin/emacsclient'
82export EDITOR='emacsclient' 86export _TERM_EMACS='emacsclient -nw -a "emacs -nw"'
87export EDITOR=$_TERM_EMACS
83 88
84# Compilation flags 89# Compilation flags
85# export ARCHFLAGS="-arch x86_64" 90# export ARCHFLAGS="-arch x86_64"
@@ -89,34 +94,35 @@ export VAGRANT_DOTFILE_PATH=~/.vagrant.d/projects
89#export SSL_CERT_FILE=/usr/local/opt/curl-ca-bundle/share/ca-bundle.crt 94#export SSL_CERT_FILE=/usr/local/opt/curl-ca-bundle/share/ca-bundle.crt
90 95
91# Aliases 96# Aliases
92alias fixfileperm='find /music -type f -exec chmod 0644 {} \;' 97#alias fixfileperm='find /music -type f -exec chmod 0644 {} \;'
93alias cleanbranches='git branch --merged | grep -v "\*" | xargs -n 1 git branch -d; git branch -r --merged master | grep -iv "master" | sed "s/origin\///" | xargs -n 1 git push --delete origin' 98alias cleanbranches='git branch --merged | grep -v "\*" | xargs -n 1 git branch -d; git branch -r --merged master | grep -iv "master" | sed "s/origin\///" | xargs -n 1 git push --delete origin'
94alias ducks='du -cks * |sort -rn |head -11' 99alias ducks='du -cks * |sort -rn |head -11'
100alias dc='docker-compose'
101alias define='sdcv'
102alias emacs=$_TERM_EMACS
103alias java18='/usr/local/java/jdk1.8.0_191/bin/java'
104alias javac18='/usr/local/java/jdk1.8.0_191/bin/javac'
95 105
106# Python
96if [ -f /usr/local/bin/virtualenvwrapper.sh ]; then 107if [ -f /usr/local/bin/virtualenvwrapper.sh ]; then
97 source /usr/local/bin/virtualenvwrapper.sh 108 source /usr/local/bin/virtualenvwrapper.sh
98elif [ -f /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh ]; then 109elif [ -f /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh ]; then
99 source /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh 110 source /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh
100fi 111fi
101 112
102 113# direnv
103
104# emacsclient is a script located in ~/bin
105# alias emacs='emacsclient'
106
107alias dc='docker-compose'
108alias define='sdcv'
109
110DIRENV=`whereis -b direnv | awk {'print $2'}` 114DIRENV=`whereis -b direnv | awk {'print $2'}`
111if [[ -f $DIRENV && -x $DIRENV ]]; then 115if [[ -f $DIRENV && -x $DIRENV ]]; then
112 eval "$(direnv hook zsh)" 116 eval "$(direnv hook zsh)"
113fi 117fi
114 118
119# GPG ssh key
115export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" 120export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
116 121
117export GPG_TTY=$(tty) 122export GPG_TTY=$(tty)
118export COMPOSE_HTTP_TIMEOUT=600 123
119export DOCKER_CLIENT_TIMEOUT=120 124#export COMPOSE_HTTP_TIMEOUT=600
125#export DOCKER_CLIENT_TIMEOUT=120
120 126
121show_virtual_env() { 127show_virtual_env() {
122 if [ -n "$VIRTUAL_ENV" ]; then 128 if [ -n "$VIRTUAL_ENV" ]; then
@@ -127,3 +133,22 @@ show_virtual_env() {
127#PS1='$(show_virtual_env)'$PS1 133#PS1='$(show_virtual_env)'$PS1
128 134
129[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh 135[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
136
137dg() {
138 // credit: doug tolton
139 dg_res=$(ls -1p \
140 | gawk -v target=$1 '$0 ~ target')
141 dg_res_count=$(echo $dg_res \
142 | gawk 'length($0) > 0' \
143 | wc -l)
144
145 if [[ "$dg_res_count" -eq 1 ]]
146 then
147 cd $(echo $dg_res)
148 elif [[ "$dg_res_count" -eq 0 ]]; then
149 echo "NO MATCHES"
150 else
151 echo $dg_res
152 echo "MATCHES: "$dg_res_count
153 fi
154}