-
Notifications
You must be signed in to change notification settings - Fork 3
/
zshrc
63 lines (51 loc) · 1.22 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
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
TZ="Europe/London"
EDITOR="/usr/bin/vim"
LC_CTYPE=en_US.UTF-8
##
# Add `brew` completion.
# - https://docs.brew.sh/Shell-Completion
#
if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH
fi
##
# `oh-my-zsh` configuration.
#
ZSH=$HOME/.oh-my-zsh
ZSH_THEME="twisty"
plugins=(git osx vi-mode history-substring-search zsh-completions)
source $ZSH/oh-my-zsh.sh
d=.dircolors
test -r $d && eval "$(dircolors $d)"
##
# use `dirs` to see the stack of past directories
# use cd ~n to access stack
#
setopt auto_pushd
##
# Use known_hosts for hostname completion.
#
if [ -f ~/.ssh/known_hosts ] ; then
zstyle ':completion:*' hosts $( sed 's/[, ].*$//' $HOME/.ssh/known_hosts )
zstyle ':completion:*:*:(ssh|scp):*:*' hosts `sed 's/^\([^ ,]*\).*$/\1/' ~/.ssh/known_hosts`
fi
##
# Aliases
#
[ -f ~/.bash_aliases ] && source ~/.bash_aliases
##
# Aliases: WSL specific…
#
if [[ -d "/mnt/c/Windows" ]] ; then
alias code='/mnt/c/Users/tim/AppData/Local/Programs/Microsoft\ VS\ Code/bin/code'
fi
##
# Fuzzy finder
# - https://github.com/junegunn/fzf
#
export FZF_DEFAULT_OPTS="--preview 'head -100 {}'"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
umask 002