From 0caae9082a3bbb14b05938a7d0f292c2e4d161f4 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Sun, 5 Apr 2020 21:34:53 +0200 Subject: lib: speed up slow parts of the lib files; other small fixes --- lib/misc.zsh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'lib/misc.zsh') diff --git a/lib/misc.zsh b/lib/misc.zsh index 61571afc9..a5d3af998 100644 --- a/lib/misc.zsh +++ b/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' -- cgit v1.2.3-70-g09d2