-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathzsh-sergiis-plugin.plugin.zsh
More file actions
83 lines (65 loc) · 2.88 KB
/
Copy pathzsh-sergiis-plugin.plugin.zsh
File metadata and controls
83 lines (65 loc) · 2.88 KB
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
## Sergii's plugin.
## -------------------------------------------------------------------------------------------------
# shellcheck disable=SC1091
typeset -gx ZSH_SERGII
ZSH_SERGII="$(dirname "$0")"
## Options
## man zshoptions
## -------------------------------------------------------------------------------------------------
unsetopt BEEP
# Advaned globbing using ksh patterns,
# see checkdot and checkdotdirs
setopt KSH_GLOB
# Advanced zsh globbing:
# man zshexpn -> FILENAME GENERATION
setopt EXTENDED_GLOB
# Allow passing the unexpanded glob.
setopt NO_NOMATCH
## history
## zsh: https://zsh.sourceforge.io/Doc/Release/Options.html#History
## oh my zsh: https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/history.zsh
## -------------------------------------------------------------------------------------------------
# History size.
# The maximum number of events stored in the internal history list.
# If you use the HIST_EXPIRE_DUPS_FIRST option, setting this value larger than the SAVEHIST
# size will give you the difference as a cushion for saving duplicated history events.
# https://zsh.sourceforge.io/Doc/Release/Parameters.html#index-HISTSIZE
export HISTSIZE=16777216 # 16,777,216 == 2^24
# The maximum number of history events to save in the history file.
# https://zsh.sourceforge.io/Doc/Release/Parameters.html#index-SAVEHIST
export SAVEHIST="${HISTSIZE}"
# Unset oh-my-zsh
# https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/history.zsh
unsetopt HIST_EXPIRE_DUPS_FIRST
# Save each command’s beginning timestamp.
# Just in case, normally is set by oh-my-zsh.
setopt EXTENDED_HISTORY
# Remove superfluous blanks from each command line being added to the history list.
setopt HIST_REDUCE_BLANKS
# Zsh history sharing cross-terminals. These options are mutuarlly exclusive.
# Load new commands to the history, but only save them on shell exist.
# setopt SHARE_HISTORY
unsetopt SHARE_HISTORY
# New history lines are added incrementally (as soon as they are entered),
# rather than waiting until the shell exits.
# setopt INC_APPEND_HISTORY
unsetopt INC_APPEND_HISTORY
# Same as INC_APPEND_HISTORY, except written after the command is after the command is finished
# to record elapsed time correctly.
setopt INC_APPEND_HISTORY_TIME
## Imports
## -------------------------------------------------------------------------------------------------
source "${ZSH_SERGII}/setup/zle.zsh"
source "${ZSH_SERGII}/setup/plugins.zsh"
source "${ZSH_SERGII}/setup/apps.zsh"
# source "${ZSH_SERGII}/universal/zle-completions.zsh"
source "${ZSH_SERGII}/universal/aliases.zsh"
source "${ZSH_SERGII}/universal/aliases-git.zsh"
source "${ZSH_SERGII}/universal/functions.zsh"
if [[ "${OSTYPE}" == darwin* ]]; then
source "${ZSH_SERGII}/osx/aliases.zsh"
source "${ZSH_SERGII}/osx/functions.zsh"
fi
source "${ZSH_SERGII}/custom/settings.zsh"
source "${ZSH_SERGII}/custom/aliases.zsh"
source "${ZSH_SERGII}/custom/functions.zsh"