Skip to content

Provide jump commands completion for nushell #1072

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alecandido
Copy link

@alecandido alecandido commented Jun 5, 2025

For custom commands (defined in Nushell itself), completion has to be directly attached to the command definition
https://www.nushell.sh/book/custom_completions.html#custom-completions

So, better to provide completion in the template itself :)


Notice that there is an entire section in the official docs of Nushell discussing zoxide completion
https://www.nushell.sh/cookbook/external_completers.html#zoxide-completer

However,

This completer is not usable for almost every other command, so it's recommended to add it as an override in the multiple completer:
[...]
Sometimes, a single external completer is not flexible enough.

i.e., it always assumes that zoxide commands are provided as external ones. While the Nushell template is defining __zoxide_z and __zoxide_zi as custom commands (internal ones).

Create completing function, wrapping zoxide query, and attach to jumping
commands arguments.
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

Successfully merging this pull request may close these issues.

1 participant