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

smart autocomplete from zsh #727

Open
williamokano opened this issue Feb 21, 2024 · 1 comment
Open

smart autocomplete from zsh #727

williamokano opened this issue Feb 21, 2024 · 1 comment

Comments

@williamokano
Copy link

williamokano commented Feb 21, 2024

Context

I tried using zoxide as replacament for cd using init --cmd cd and I found a few differences that are annoying after a few years of using the default zsh cd syntax.

Imagine I have the following directories:

xp-foo-bar
xp-infra-charts
xp-infra-drone
xp-infra-terraform
xp-tf-infra-ips
xp-something-else

In zsh cd, if I type infra and hit tab, it will autocomplete the common part, which is -infra- (but it's not as useful) but if I hit tab again, it will show the options (and let me navigate it) only for the matching part.

I think it goes kind of hand in hand of what zoxide proposes for smart navigation, as sometimes I have too many directories and I only remember part of the name.

In this case I was just using zoxide to start populating some data/directories into database, but the navigation of unknown directories to zoxide become poorer.

Another example would be "cd something", it would check that there's only 1 matching something and autocomplete, on tab, the whole directory for me.

Expectations

cd infra<TAB> would list all the directories in the current level matching infra on its name
cd something<TAB> would autofill xp-something-else for me.

Actual Results

cd infra<TAB> do nothing
cd something<TAB> do nothing

Notes

I tried the compinit as mentioned on several issues:

  • compinit before
  • compinit after
  • autoload compinit

Nothing helped.

Versions

zsh 5.9 (x86_64-apple-darwin23.0)
zoxide 0.9.4
fzf 0.43.0 (brew)
omz master (15ffbdd)
macOS 14.3.1 23D60 arm64

@williamokano
Copy link
Author

Seems related to #712

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

1 participant