Skip to content

Commit

Permalink
Refactor logic to initialize fzf in zsh plugin to support a new condi…
Browse files Browse the repository at this point in the history
…tion where fzf can be disabled.
  • Loading branch information
skywind3000 committed Feb 19, 2024
1 parent a9e034c commit 9a24fef
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions z.lua.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ fi

export _ZL_FZF_FLAG=${_ZL_FZF_FLAG:-"-e"}

_ZL_ZSH_FZF=${_ZL_ZSH_FZF:-fzf}

eval "$($ZLUA_EXEC $ZLUA_SCRIPT --init zsh once enhanced $_ZL_ZSH_FZF)"
if [[ -z "$_ZL_ZSH_NO_FZF" ]]; then
eval "$($ZLUA_EXEC $ZLUA_SCRIPT --init zsh once enhanced zsh)"
else
eval "$($ZLUA_EXEC $ZLUA_SCRIPT --init zsh once enhanced)"
fi

if [[ -z "$_ZL_NO_ALIASES" ]]; then
alias zz='z -i'
Expand Down

4 comments on commit 9a24fef

@chenkui164
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

第25行,
eval "$($ZLUA_EXEC $ZLUA_SCRIPT --init zsh once enhanced zsh)"
这里是不是写错了?
应该是
eval "$($ZLUA_EXEC $ZLUA_SCRIPT --init zsh once enhanced fzf)"

@skywind3000
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对,写反了。

@chenkui164
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

初始化条件这里写错了吧,不应该是 “zsh once enhanced zsh“,条件里面两个zsh, 应该把最后的zsh改成fzf吧

@skywind3000
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已改。

Please sign in to comment.