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> says no match found but zi show matching directories #692

Open
Pmyl opened this issue Feb 14, 2024 · 6 comments
Open

z foo<SPACE><TAB> says no match found but zi show matching directories #692

Pmyl opened this issue Feb 14, 2024 · 6 comments

Comments

@Pmyl
Copy link

Pmyl commented Feb 14, 2024

Hello, I just installed zoxide and fzf but I can't make it work as it should.

Using z foo works great
Using zi works great
Using z foo<SPACE><TAB> has very weird behaviours.

Let's say the content of zi is:

/media/pmyl/big/projects
/media/pmyl/big

This happens

z media<SPACE><TAB>
Executes (with new shell prompt): z media zoxide: no match found

z big<SPACE><TAB>
Autocompletes: z big z!/media/pmyl/big

z projects<SPACE><TAB>
Autocompletes z big z!/media/pmyl/big/projects

Am I doing anything wrong?

If that matters, the examples above use z for simplicity but I've configured it to replace cd through zoxide init --cmd cd fish | source.

I use these versions, all installed through homebrew:
zoxide 0.9.3
fzf 0.46.1
fish 3.7.0

@birtles
Copy link

birtles commented Feb 17, 2024

I see the same behavior and have the exact same versions of zoxide, fzf, and fish so I wonder if this is a fish-specific issue, perhaps stemming from this changeset: 0b51cb6 ?

@emirkmo
Copy link

emirkmo commented Feb 18, 2024

I have the same issue on zsh, and it works if I use __zoxide_cd instead of my cd alias
__zoxide_cd home<space><tab> works fine.
cd home<space><tab>: zoxide: no match found


zoxide --version: 0.9.3
fzf --version: 0.29 (devel)

@nurkiewicz
Copy link

nurkiewicz commented Feb 19, 2024

I get the same behavior on zsh with oh-my-zsh:

zoxide --version
$ zoxide 0.9.3

$ fzf --version
0.42.0 (brew)

U have this alias set up:

$ which cd
cd: aliased to z

zi works.

@brutus
Copy link

brutus commented Mar 6, 2024

Seems I have the same issue…

cat /etc/fedora-release 
Fedora release 39 (Thirty Nine)

❯ fish --version
fish, version 3.7.0

❯ zoxide --version
zoxide 0.9.2

❯ fzf --version
0.44.1 (Fedora)

❯ type cd
cd is a function with definition
# Defined via `source`
function cd --wraps=__zoxide_z --description 'alias cd=__zoxide_z'
  __zoxide_z $argv
end

Works as expected until I <space><tab>. Which seems fine at first too, menu shown and all, but turns the result into z!<result>, e.g.

cd tmp z!/tmp

NOTE: cdi works fine.

UPDATE: just noticed b/c it broke ALT+C support of fzf (works again after a functions --erase cd).

@lalitkapoor
Copy link

I get tab completions in fish if I don't change the cmd to cd on init via init --cmd cd and just use z. It would be great to get it to autocomplete when replace cd.

@vasi786
Copy link

vasi786 commented Jun 1, 2024

Same issue, but on bash, I do not have interactive fuzzy finding when I do space+tab

NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31"
.bashrc
eval "$(zoxide init --cmd cd bash)" export _ZO_ECHO='1' export _ZO_DATA_DIR='/home/$USER/.local/share/zoxide/' export _ZO_MAXAGE=10000
zoxide --version zoxide 0.9.4
bash --version GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)

fzf --version 0.52.1

and which cd gives me /usr/bin/cd, but when I do type cd, I get
cd is a function cd () { __zoxide_z "$@" }

The echo of the path doesn't work when I have --cmd cd, but it works without it. Also, without --cmd cd, the interactive fuzzy finding is absent.

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

7 participants