-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path04_autoload.zsh
46 lines (36 loc) · 1.25 KB
/
04_autoload.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
# Initialize colors
autoload -Uz colors
colors
# Fullscreen command line edit
autoload -Uz edit-command-line
zle -N edit-command-line
bindkey "^X^E" edit-command-line
# Ctrl+W stops on path delimiters
autoload -Uz select-word-style
select-word-style bash
# Enable run-help module
(( $+aliases[run-help] )) && unalias run-help
autoload -Uz run-help
alias help=run-help
# enable bracketed paste
autoload -Uz bracketed-paste-url-magic
zle -N bracketed-paste bracketed-paste-url-magic
# enable url-quote-magic
autoload -Uz url-quote-magic
zle -N self-insert url-quote-magic
# Use default provided history search widgets
autoload -Uz up-line-or-beginning-search
zle -N up-line-or-beginning-search
autoload -Uz down-line-or-beginning-search
zle -N down-line-or-beginning-search
# Enable functions from archive plugin
fpath+="${ZDOTDIR}/plugins/archive"
autoload -Uz archive lsarchive unarchive
# Ensure add-zsh-hook is loaded, as it's used in rc files
autoload -Uz add-zsh-hook
# Custom personal functions
# Don't use -U as we need aliases here
autoload -z lspath bag fgb fgd fgl fz ineachdir psg vpaste evalcache compdefcache
# Enable wrapper, if original command is available
(( ${+commands[man]} )) && autoload -z wrap-man
(( ${+commands[sudo]} )) && autoload -z wrap-sudo