-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc.zsh
86 lines (64 loc) · 1.91 KB
/
zshrc.zsh
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
local ZROOT=$HOME/dotfiles
ZDOTDIR=${ZDOTDIR:-${HOME}/.zsh}
#ZSHDDIR="${HOME}/.config/zsh.d"
HISTFILE="${ZDOTDIR}/.zsh_history"
HISTSIZE='10000'
SAVEHIST="${HISTSIZE}"
export TMP="$HOME/.tmp"
export TEMP="$TMP"
export TMPDIR="$TMP"
export TMPPREFIX="${TMPDIR}/zsh"
[[ ! -d "${TMP}" ]] && mkdir "${TMP}"
bindkey '^S' beginning-of-line
bindkey '^E' end-of-line
# zmv - a command for renaming files by means of shell patterns.
autoload -U zmv
# zargs, as an alternative to find -exec and xargs.
autoload -U zargs
# Turn on command substitution in the prompt (and parameter expansion and arithmetic expansion).
setopt promptsubst
# Ignore lines prefixed with '#'.
setopt interactivecomments
# Ignore duplicate in history.
setopt hist_ignore_dups
# Prevent record in history entry if preceding them with at least one space
setopt hist_ignore_space
# Nobody need flow control anymore. Troublesome feature.
setopt noflowcontrol
autoload -Uz compinit
compinit
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
zstyle ':completion:*' completer _expand _complete _ignored _approximate
zstyle ':completion:*' menu select=2
zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s'
zstyle ':completion::complete:*' use-cache 1
zstyle ':completion:*:descriptions' format '%U%F{cyan}%d%f%u'
# Completion.
fpath=($ZROOT/completion $fpath)
##
# iterm integration
#source ~/.iterm2_shell_integration.`basename $SHELL`
##
# Load basic functions
if [[ -e $ZROOT/basics.zsh ]]; then
source $ZROOT/basics.zsh
else
echo "*E* ./basics.zsh not found."
fi
##
# Load aliases
try_source $ZROOT/aliases.zsh "*E*"
##
# Load functions
try_source $ZROOT/functions.zsh "*E*"
##
# Load RIOT base command
try_source $ZROOT/riot_base.zsh
##
# Load App options
try_source $ZROOT/apps_options.zsh
##
# Load PROMPT definition
try_source $ZROOT/prompt.zsh
export EDITOR="subl -w"
export PATH="/usr/local/bin:/usr/local/sbin:$PATH"