Comments (9)
zsh does not redraw my prompt when I jump with fzf
Please clarify. When using fzf integration in z.lua
, should it be clean prompt after jumping to the directory.
from z.lua.
我也有这个问题,通过fzf, 选择一个路径后,prompt没有刷新,实际目录已经跳转过去了。
from z.lua.
我也有这个问题, 通过 fzf, 选择一个路径后,prompt 没有刷新,实际目录已经跳转过去了
I also have this problem. Through fzf, after selecting a path, the prompt is not refreshed and the actual directory has been redirected.
实际上这并不是一个问题,就是这么设计的,或者我没有找到 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)"
from z.lua.
I'm running into the same issue where my prompt does not get updated/refreshed after selecting a destination with fzf.
This is how I've installed z.lua:
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 ~/Downloads
directory but my prompt does not update until I hit Enter again.
from z.lua.
Hi @rrpolanco
What prompt framework do you use? (I use starship1, have not encountered such a problem)
Footnotes
from z.lua.
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.
from z.lua.
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
from z.lua.
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 ?
If so, how to modify the zsh initializing code to put z.lua to the first one ?
from z.lua.
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 fzf
option.
Perhaps using fzf through fzf-tab
is a better choice.
from z.lua.
Related Issues (20)
- dirstack shows the frecency rather than index while using powershell HOT 3
- [FR] 当 z 一个文件路径时 cd 到它的目录
- z ~ 存在问题 HOT 5
- _ZL_FZF_FLAG doesn't work
- Weird behavior in Cryptomator vault (FUSE)
- 关于powershell install教程中对profile.ps1文件添加Invoke-Expression时的问题
- .zlua file is always empty HOT 5
- z foo cmd not working HOT 11
- z.lua conflicts with oh-my-posh HOT 1
- lua进程不关闭 HOT 4
- git bash中报错 HOT 1
- 在git bash中报错 HOT 2
- 在mac下的终端zsh安装报错
- z cannot save other drive history in windows HOT 3
- Can z.lua be used with nushell? HOT 1
- Zlua unable to deal with chinese char correctly after setting utf8 encoding in powershell. HOT 1
- z.lua init fail: attempt to concatenate a nil value (local 'path')
- --init show zsh: parse error near `>&' HOT 4
- Can we change the saving path of data file, looks like not support now HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from z.lua.