-
Notifications
You must be signed in to change notification settings - Fork 1
/
.zshrc.symlink
59 lines (48 loc) · 2.16 KB
/
.zshrc.symlink
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
# vim: filetype=zsh
# History settings
# From https://martinheinz.dev/blog/110
HISTFILE=~/.zsh_histfile
HISTSIZE=10000000
SAVEHIST=10000000
HISTORY_IGNORE="(ls|cd|pwd|exit|cd)*"
setopt EXTENDED_HISTORY # Write the history file in the ':start:elapsed;command' format.
setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits.
setopt SHARE_HISTORY # Share history between all sessions.
setopt HIST_IGNORE_DUPS # Do not record an event that was just recorded again.
setopt HIST_IGNORE_ALL_DUPS # Delete an old recorded event if a new event is a duplicate.
setopt HIST_IGNORE_SPACE # Do not record an event starting with a space.
setopt HIST_SAVE_NO_DUPS # Do not write a duplicate event to the history file.
setopt HIST_VERIFY # Do not execute immediately upon history expansion.
setopt APPEND_HISTORY # append to history file (Default)
setopt HIST_NO_STORE # Don't store history commands
setopt HIST_REDUCE_BLANKS # Remove superfluous blanks from each command line being added to the history.
setopt autocd extendedglob nomatch notify
bindkey -v
export KEYTIMEOUT=1
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/$HOME/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
# Autocompletion using arrow keys (based on history)
autoload -U up-line-or-beginning-search
autoload -U down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
bindkey "^[OA" up-line-or-beginning-search # Up
bindkey "^[OB" down-line-or-beginning-search # Down
# Automatically source all files/links in the directory config_dir
# If the auto-source folder exists and has files in it...
config_dir="$HOME/.shellrc.d"
if [[ -d $config_dir ]]; then
# If the directory is not empty...
if [[ "$(\ls -A $config_dir)" ]]; then
# Loop through files (in alphabetical order) and source them.
# To specify a load order, files can be prefixed with numbers
# (e.g. 00--filename, 50--filename, 95--filename)
for file in $config_dir/*; do
source "${file}"
done
fi
fi