-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
75 lines (60 loc) · 1.81 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
#! /bin/zsh
# Use homebrew autocompletion
if type brew &>/dev/null
then
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
fi
# Enable tmuxination autocompletion
if type "tmuxinator" &>/dev/null
then
eval "$(tmuxinator completions zsh)"
fi
# Enable fzf autocompletion
if type "fzf" &>/dev/null
then
source <(fzf --zsh)
fi
# Enable built in autocompletion
autoload -U compinit
compinit
# This appends the history file incrementally allowing shared history between
# terminal windows/tmux panes.
setopt INC_APPEND_HISTORY
HISTFILE=~/.history
HISTSIZE=50000
# Add local scripts to PATH
PATH="${HOME}/.bin:${PATH}"
PATH="${HOME}/.local/bin:${PATH}"
export PATH
# Use the Terminal to unlock GPG keys. Used for passwordstore.
TTY=$(tty)
export GPG_TTY=$TTY
# Use machine local homebrew bundle files
HOSTNAME=$(hostname)
export HOMEBREW_BUNDLE_FILE_GLOBAL="${HOME}/.config/brewfile/${HOSTNAME}.Brewfile"
# This reduces the timeout when sending multiple control characters to the
# terminal. I have it set this way so that I can start typing more quickly after
# changing tmux panes.
export KEYTIMEOUT=1
# Use vim style keybinds.
bindkey -v
# Manage dotfiles in git.
alias dot='git \
--git-dir=${HOME}/Source/github.com/bolny/dot.git/ \
--work-tree=${HOME}'
# If I have to any of these out one more time I will lose my mind.
alias ll='ls -lahFG' # Is this compatible with gls?
alias brew='arch -arm64 brew' # Make homebrew use arm64 since I have no Intel
# BSD date doesn't have iso8601 output.
alias isodate='date -u +"%Y-%m-%dT%H:%M:%SZ"'
# Just some useful shorcuts
alias gg='git grep' # limit grep to files under version control.
alias vi='vim'
alias v='vim'
alias t='tmux'
alias mux='tmuxinator'
# Starship is the least worst prompt I've seen.
if type "starship" > /dev/null
then
eval "$(starship init zsh)"
fi