-
Notifications
You must be signed in to change notification settings - Fork 3
/
.zshrc
88 lines (67 loc) · 2.27 KB
/
.zshrc
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# set -x
# https://scriptingosx.com/2019/07/moving-to-zsh-part-4-aliases-and-functions/
export PATH="/opt/homebrew/bin:$PATH"
autoload -Uz vcs_info
precmd() { vcs_info }
zstyle ':vcs_info:git:*' formats ' %b'
setopt PROMPT_SUBST
export PROMPT='%(?.%F{green}√.%F{red}?%?)%f %B%F{240}%1~%f%b%F{green}${vcs_info_msg_0_}%f %# '
setopt NO_CASE_GLOB
setopt AUTO_CD
HISTFILE=${ZDOTDIR:-$HOME}/.zsh_history
setopt EXTENDED_HISTORY
SAVEHIST=5000
HISTSIZE=2000
# share history across multiple zsh sessions
setopt SHARE_HISTORY
# append to history
setopt APPEND_HISTORY
# adds commands as they are typed, not at shell exit
setopt INC_APPEND_HISTORY
# expire duplicates first
setopt HIST_EXPIRE_DUPS_FIRST
# do not store duplications
setopt HIST_IGNORE_DUPS
#ignore duplicates when searching
setopt HIST_FIND_NO_DUPS
# removes blank lines from history
setopt HIST_REDUCE_BLANKS
setopt CORRECT
setopt CORRECT_ALL
export EDITNOW='subl'
export EDITOR='subl -w'
export LESS="$LESS -i -F -R -X"
alias ls="/bin/ls -F"
alias respec="rspec --only-failures"
# allow PUMA_DEV_BIN="./puma-dev" for installing dev versions
export PUMA_DEV_BIN='puma-dev'
alias puma-dev-setup="sudo $PUMA_DEV_BIN -d test:localhost:loc.al -setup"
alias puma-dev-install="$PUMA_DEV_BIN -d test:localhost:loc.al -install"
alias puma-dev-uninstall="$PUMA_DEV_BIN -uninstall -d test:localhost:loc.al"
alias vboxup='VBoxManage list runningvms | grep ubuntu-18.04 || VBoxManage startvm ubuntu-18.04 --type headless'
function puma-dev-ln () {
echo ln -sf $1 "~/.puma-dev/$(basename $1)"
echo ln -sf $1 "~/.puma-dev/$(basename $1).loc"
}
alias git='hub'
alias ls='ls -F'
alias ll='ls -l'
alias l='ls'
host=$(uname -n | sed -e 's/\.local//g')
brewery=$(brew --prefix)
# autojump
. "$brewery/etc/profile.d/autojump.sh"
# asdf
brew_prefix_asdf="$brewery/opt/asdf"
export ASDF_DIR="$brew_prefix_asdf"
. "$brew_prefix_asdf/asdf.sh"
# To make Homebrew’s completions available in zsh, you must get the Homebrew-managed zsh site-functions on your FPATH
# before initialising zsh’s completion facility.
# Add the following to your ~/.zshrc file:
if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH
autoload -Uz compinit
compinit
fi
export PATH="/usr/local/opt/sqlite/bin:$PATH"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh