mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-05-11 05:55:17 +00:00
lib: speed up slow parts of the lib files; other small fixes
This commit is contained in:
20
lib/misc.zsh
20
lib/misc.zsh
@@ -3,15 +3,15 @@ autoload -Uz is-at-least
|
||||
# *-magic is known buggy in some versions; disable if so
|
||||
if [[ $DISABLE_MAGIC_FUNCTIONS != true ]]; then
|
||||
for d in $fpath; do
|
||||
if [[ -e "$d/url-quote-magic" ]]; then
|
||||
if is-at-least 5.1; then
|
||||
autoload -Uz bracketed-paste-magic
|
||||
zle -N bracketed-paste bracketed-paste-magic
|
||||
fi
|
||||
autoload -Uz url-quote-magic
|
||||
zle -N self-insert url-quote-magic
|
||||
break
|
||||
fi
|
||||
if [[ -e "$d/url-quote-magic" ]]; then
|
||||
if is-at-least 5.1; then
|
||||
autoload -Uz bracketed-paste-magic
|
||||
zle -N bracketed-paste bracketed-paste-magic
|
||||
fi
|
||||
autoload -Uz url-quote-magic
|
||||
zle -N self-insert url-quote-magic
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -25,7 +25,7 @@ env_default 'LESS' '-R'
|
||||
alias _='sudo '
|
||||
|
||||
## more intelligent acking for ubuntu users
|
||||
if which ack-grep &> /dev/null; then
|
||||
if (( $+commands[ack-grep] )); then
|
||||
alias afind='ack-grep -il'
|
||||
else
|
||||
alias afind='ack -il'
|
||||
|
Reference in New Issue
Block a user