-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinit.zsh
87 lines (62 loc) · 1.9 KB
/
init.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
86
87
#
# Generic options and environment settings
#
#
# Changing directories
#
# Perform cd to a directory if the typed command is invalid, but is a directory.
setopt AUTO_CD
# Make cd push the old directory to the directory stack.
setopt AUTO_PUSHD
autoload -Uz is-at-least && if is-at-least 5.8; then
# Don't print the working directory after a cd.
setopt CD_SILENT
fi
# Don't push multiple copies of the same directory to the stack.
setopt PUSHD_IGNORE_DUPS
# Don't print the directory stack after pushd or popd.
setopt PUSHD_SILENT
# Have pushd without arguments act like `pushd ${HOME}`.
setopt PUSHD_TO_HOME
#
# Expansion and globbing
#
# Treat `#`, `~`, and `^` as patterns for filename globbing.
setopt EXTENDED_GLOB
#
# History
#
# The file to save the history in.
if (( ! ${+HISTFILE} )) typeset -g HISTFILE=${ZDOTDIR:-${HOME}}/.zhistory
# The maximum number of events stored internally and saved in the history file.
# The former is greater than the latter in case user wants HIST_EXPIRE_DUPS_FIRST.
HISTSIZE=20000
SAVEHIST=10000
# Don't display duplicates when searching the history.
setopt HIST_FIND_NO_DUPS
# Don't enter immediate duplicates into the history.
setopt HIST_IGNORE_DUPS
# Remove commands from the history that begin with a space.
setopt HIST_IGNORE_SPACE
# Don't execute the command directly upon history expansion.
setopt HIST_VERIFY
# Cause all terminals to share the same history 'session'.
setopt SHARE_HISTORY
#
# Input/output
#
# Allow comments starting with `#` in the interactive shell.
setopt INTERACTIVE_COMMENTS
# Disallow `>` to overwrite existing files. Use `>|` or `>!` instead.
setopt NO_CLOBBER
#
# Job control
#
# List jobs in verbose format by default.
setopt LONG_LIST_JOBS
# Prevent background jobs being given a lower priority.
setopt NO_BG_NICE
# Prevent status report of jobs on shell exit.
setopt NO_CHECK_JOBS
# Prevent SIGHUP to jobs on shell exit.
setopt NO_HUP