summaryrefslogtreecommitdiff
path: root/lib/misc.zsh
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2020-04-24 20:54:33 -0600
committerTuowen Zhao <ztuowen@gmail.com>2020-04-24 20:54:33 -0600
commitc197ad40f1dca62fd1e0e555e7bfc84e39f31223 (patch)
tree5c1e753e0ff2cb9d0e08a699f17352225b9ef9f1 /lib/misc.zsh
parent0b67340fd2fe9330d8487491e1983ad1a111fb2b (diff)
parent2560f04982dfc2693221c7c0f47d1a71df09a794 (diff)
downloadzsh-c197ad40f1dca62fd1e0e555e7bfc84e39f31223.tar.gz
zsh-c197ad40f1dca62fd1e0e555e7bfc84e39f31223.tar.bz2
zsh-c197ad40f1dca62fd1e0e555e7bfc84e39f31223.zip
Merge branch 'master' of https://github.com/ohmyzsh/ohmyzsh
Diffstat (limited to 'lib/misc.zsh')
-rw-r--r--lib/misc.zsh20
1 files changed, 10 insertions, 10 deletions
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'