-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzsh-env.sh
59 lines (48 loc) · 1.57 KB
/
zsh-env.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# add 'source dotfiles/bash_profile' to ~/.bash_profile
export PATH=$HOME/bin:$HOME/.cargo/bin:$PATH
# used by highlight within ranger
export HIGHLIGHT_STYLE='solarized-light'
alias p='ls -GF'
alias pg='p | grep -i'
alias tre='tree -FCA'
alias cpwd="pwd | tr -d '\n' | pbcopy"
alias g='git'
alias dr='docker'
alias t='tig status'
alias dc='docker compose'
alias npm-exec='PATH=$(npm bin):$PATH'
alias htop='sudo htop'
alias pbcopy="perl -p -e 'chomp if eof' | pbcopy"
alias atom='open -a Atom'
alias rr='ranger --choosefiles=/tmp/ranger-files'
alias emulsion.me='ssh [email protected]'
alias mattschick.com='ssh [email protected]'
alias schickm.com='ssh [email protected]'
# load custom path if present
if [ -f ~/.path ]; then
source ~/.path
fi
# up that history size
SAVEHIST=10000
HISTSIZE=10000
# single ENTER during history completion
zmodload zsh/complist
bindkey -M menuselect '^M' .accept-line
unsetopt share_history
setopt HIST_IGNORE_SPACE
gdf() {
echo 'Commits that exist in '$1' but not in '$2':'
git log --graph --pretty=format:'%Cred%h%Creset %s' --abbrev-commit $2..$1
echo 'Commits that exist in '$2' but not in '$1':'
git log --graph --pretty=format:'%Cred%h%Creset %s' --abbrev-commit $1..$2
}
if command -v direnv 1>/dev/null 2>&1; then
eval "$(direnv hook zsh)"
fi
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi
# -X leaves file contents on the screen when less exits.
# -F makes less quit if the entire output can be displayed on one screen.
# -R displays ANSI color escape sequences in "raw" form.
export LESS="-XFR"