mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-29 04:53:17 +02:00
[!] optimize
This commit is contained in:
parent
55ea51a6cd
commit
f038b6bddc
2 changed files with 19 additions and 4 deletions
|
|
@ -19,8 +19,8 @@ fi
|
||||||
setopt long_list_jobs
|
setopt long_list_jobs
|
||||||
|
|
||||||
## pager
|
## pager
|
||||||
env_default PAGER 'less'
|
[[ -n "$PAGER" ]] || export PAGER='less'
|
||||||
env_default LESS '-R'
|
[[ -n "$PAGER" ]] || export PAGER='less'
|
||||||
|
|
||||||
## super user alias
|
## super user alias
|
||||||
alias _='sudo'
|
alias _='sudo'
|
||||||
|
|
|
||||||
19
oh-my-zsh.sh
19
oh-my-zsh.sh
|
|
@ -64,6 +64,11 @@ if [ -z "$ZSH_COMPDUMP" ]; then
|
||||||
ZSH_COMPDUMP="${ZDOTDIR:-${HOME}}/.zcompdump-${SHORT_HOST}-${ZSH_VERSION}"
|
ZSH_COMPDUMP="${ZDOTDIR:-${HOME}}/.zcompdump-${SHORT_HOST}-${ZSH_VERSION}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# On slow systems, checking the cached .zcompdump file to see if it must be
|
||||||
|
# regenerated adds a noticable delay to zsh startup. This little hack restricts
|
||||||
|
# it to once a day. It should be pasted into your own completion file.
|
||||||
|
#https://gist.github.com/ctechols/ca1035271ad134841284
|
||||||
|
setopt extendedglob
|
||||||
if [[ $ZSH_DISABLE_COMPFIX != true ]]; then
|
if [[ $ZSH_DISABLE_COMPFIX != true ]]; then
|
||||||
# If completion insecurities exist, warn the user without enabling completions.
|
# If completion insecurities exist, warn the user without enabling completions.
|
||||||
if ! compaudit &>/dev/null; then
|
if ! compaudit &>/dev/null; then
|
||||||
|
|
@ -71,10 +76,20 @@ if [[ $ZSH_DISABLE_COMPFIX != true ]]; then
|
||||||
handle_completion_insecurities
|
handle_completion_insecurities
|
||||||
# Else, enable and cache completions to the desired file.
|
# Else, enable and cache completions to the desired file.
|
||||||
else
|
else
|
||||||
compinit -d "${ZSH_COMPDUMP}"
|
if [[ -n "${ZSH_COMPDUMP}"(#qN.mh+24) ]]; then
|
||||||
|
compinit -d "${ZSH_COMPDUMP}"
|
||||||
|
compdump
|
||||||
|
else
|
||||||
|
compinit -C
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
compinit -i -d "${ZSH_COMPDUMP}"
|
if [[ -n "${ZSH_COMPDUMP}"(#qN.mh+24) ]]; then
|
||||||
|
compinit -i -d "${ZSH_COMPDUMP}"
|
||||||
|
compdump
|
||||||
|
else
|
||||||
|
compinit -C
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Load all of the plugins that were defined in ~/.zshrc
|
# Load all of the plugins that were defined in ~/.zshrc
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue