-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prompt does not show after jump when fzf is enabled #186
Comments
Please clarify. When using fzf integration in |
我也有这个问题,通过fzf, 选择一个路径后,prompt没有刷新,实际目录已经跳转过去了。 |
实际上这并不是一个问题,就是这么设计的,或者我没有找到 prompt 刷新的方法(我花了三天的空余时间来查看文档并实现这个功能,如果你有更好的方式欢迎提交 PR 去修改它)。 In fact, this is not a problem, it's designed this way, or I haven't found the method to refresh the prompt (I spent three days of my spare time reviewing the documentation and implementing this feature, if you have a better way feel free to submit a PR to modify it). 如果 fzf 跳转让你感到困惑,在初始化时删除 fzf 即可,它会回到之前的功能。 If fzf complete makes you feel confused, you can delete fzf during init, and it will return to its previous function. - eval "$($ZLUA_EXEC $ZLUA_SCRIPT --init zsh once enhanced fzf)"
+ eval "$($ZLUA_EXEC $ZLUA_SCRIPT --init zsh once enhanced)" |
I'm running into the same issue where my prompt does not get updated/refreshed after selecting a destination with fzf. export _ZL_ADD_ONCE=1
export _ZL_DATA="$XDG_DATA_HOME/z.lua/database"
export _ZL_ECHO=1
export _ZL_HYPHEN=1
export _ZL_MATCH_MODE=1
export _ZL_ROOT_MARKERS=".git,.svn,.hg,.root,package.json"
zinit wait lucid light-mode for \
has'lua' \
atclone'mkdir -p "$(dirname "$_ZL_DATA")"; touch "$_ZL_DATA"' \
id-as'auto' \
@skywind3000/z.lua Here's what I see. I select the |
Hi @rrpolanco What prompt framework do you use? (I use starship1, have not encountered such a problem) Footnotes |
Hi @kang8, I'm using powerlevel10k to render my prompt. Maybe there is some setting I need to set in p10k to redraw the prompt. |
Does z.lua invoke precmd hooks before resetting prompt? If not, this explains why it doesn't work with powerlevel10k. You can invoke the hooks like this: local f
for f in precmd ${precmd_functions[@]}; do
[[ "${+functions[$f]}" == 0 ]] || "$f" &>/dev/null || true
done |
z.lua should be initialized before powerlevel10k, but the zsh code is written by other contributor and I don't know how to improve it: Lines 2233 to 2251 in 7f2bfcb
@romkatv , does the index of precmd_functions array relate to the precmd execution order ? |
I also encountered this issue. However, after adding the fzf-tab plugin wrapper for zsh, the problem disappeared even when zlua was initialized with the Perhaps using fzf through |
doing NOTE: using |
zsh does not redraw my prompt when I jump with fzf. Does anyone else have the same problem?
Look how fzf ensures the prompt is redrawn after https://github.com/junegunn/fzf/blob/3c09c77269d848f5e7dd8f350a90e8d7ed760845/shell/key-bindings.zsh#L88
The text was updated successfully, but these errors were encountered: