Skip to content
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

z foo<SPACE><TAB> does nothing and behaves strange #974

Open
LDprg opened this issue Jan 11, 2025 · 2 comments
Open

z foo<SPACE><TAB> does nothing and behaves strange #974

LDprg opened this issue Jan 11, 2025 · 2 comments

Comments

@LDprg
Copy link

LDprg commented Jan 11, 2025

Using zi work just fine as expected, plain z also.
But as soon as I use z the fzf window shows as expected, but when I hit enter just some weird short flickering and then nothing happened.

Another thing I notice is that when using an additional space gets inserted. And when exiting the fzf window with Esc, the command gets duplicated with escape sequences before each whitespace. (This only happens when using z foo)

Also, there seems to be a lot of inconsistencies with z foo like zi opens a new clean command line.

I am not sure how is implemented, but if z foo and zi use different implementations, maybe should just be redirected to zi?

@LDprg
Copy link
Author

LDprg commented Jan 11, 2025

And here just some system information:
zoxide 0.9.6
fzf 0.57.0
fish 3.7.1
kitty 0.38.1
Arch Linux

@samling
Copy link

samling commented Feb 26, 2025

Edit 2: Fish 4.0 seems to have largely resolved the artifacting issues. The only thing that remains is ^C when a directory is chosen and changed to. I also found a duplicate zoxide init fish in my config; removing that seems to have fixed the multiple keypresses required. The issue of multiple invocations of zoxide through refreshing my configuration remains, but that feels like maybe I'm doing something wrong.

Edit: I've narrowed down the issue a bit; I have a function to quickly (re)source my fish config (to apply changes), and I've noticed that I have to accept the fzf result N times, where N is however many times I've sourced my config, I'm toying with fish as an option to switch away from zsh, so maybe this is just the wrong way to be reloading my config in fish.

That being said, there's still some weird behavior on a fresh launch of fish where accepting the fzf result produces some strange artifacts. I'm using the pure prompt here but I get the same behavior with the default fish prompt.

Image

(original response below)
I'm experiencing something similar with a fresh fish and zoxide install. Enabling zoxide with zoxide init --cmd cd fish and then doing e.g. cd do <tab> brings up fzf fine, but I have to hit enter 4-5 times before it will change directories, and z!<path> gets appended to my original command. zi works fine.

WSL
zoxide 0.9.7
fzf 0.58.0
fish 3.7.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants