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

Bug: fish integration seems to limit the number of layers of autocompletion #128

Closed
XaF opened this issue Sep 13, 2023 · 1 comment · Fixed by #269
Closed

Bug: fish integration seems to limit the number of layers of autocompletion #128

XaF opened this issue Sep 13, 2023 · 1 comment · Fixed by #269
Labels
bug Something isn't working

Comments

@XaF
Copy link
Owner

XaF commented Sep 13, 2023

Example:

  1. Create the following directory structure:
    cmd/
       a/
          b/
             c/
                d/
                   e/
                      f.sh
    
    i.e. mkdir -p cmd/a/b/c/d/e && touch cmd/a/b/c/d/e/f.sh
  2. Run chmod +x cmd/a/b/c/d/e/f.sh
  3. Add the directory to your omnipath (ideally do this in a git repository): set -Ux OMNIPATH $PWD/cmd
  4. Try omni autocompletion: omni a <tab>

This does autocomplete the b but does not seem to pursue after.
This seems similar with any other commands.

Omni does return the right autocompletion value (COMP_CWORD=2 omni --complete a returns b, COMP_CWORD=3 omni --complete a b returns c, etc.).

This works as expected on bash and zsh (i.e. autocomplete until omni a b c d e f), fish is the only one having a weird behavior.

@XaF XaF added the bug Something isn't working label Sep 13, 2023
@XaF
Copy link
Owner Author

XaF commented Sep 13, 2023

@tminusplus since you're using fish, would be able to investigate what's happening / make a PR to fix the issue in the fish template?

@oefd I think you're using fish too?

@XaF XaF closed this as completed in #269 Dec 10, 2023
XaF pushed a commit that referenced this issue Dec 10, 2023
The `args` parsing code was sending the arguments as a single string,
rather than as an array.

If you typed `omni config path <TAB>` then `["config path"]` was passed
as args into `omni --complete` instead of the expected `["config",
"path"]`.

Fixes #128.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant