From 4af4fe9b842f827f6acd0274213fbe3d10c8d1eb Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Fri, 10 Jun 2016 05:17:46 +0200 Subject: [PATCH] Better immunity to setopt nofunctionargzero --- history-search-multi-word.plugin.zsh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/history-search-multi-word.plugin.zsh b/history-search-multi-word.plugin.zsh index bec42c2..1046b45 100644 --- a/history-search-multi-word.plugin.zsh +++ b/history-search-multi-word.plugin.zsh @@ -4,11 +4,7 @@ # to ~/.zshrc. # -# This gives immunity to functionargzero being unset -# _ will be set to last argument to source builtin -PLUGIN_UNDERSCORE="$_" -[ "$0" != "$PLUGIN_UNDERSCORE" ] && 0="$PLUGIN_UNDERSCORE" - +0="${(%):-%N}" # this gives immunity to functionargzero being unset REPO_DIR="${0%/*}" if [[ -z "$ZPLG_CUR_PLUGIN" && "${fpath[(r)$REPO_DIR]}" != $REPO_DIR ]]; then fpath+=( "$REPO_DIR" )