fish completion not working at all
What version of CUE are you using (cue version)?
$ cue version cue version v0.4.2 linux/amd64
Installed via go install cuelang.org/go/cmd/cue@latest with Go v1.18.1.
Does this issue reproduce with the latest release?
Yes, this is the latest release.
What did you do?
Generating fish completions as per the instructions (of cue completion -h) and putting them in fish's completions directory has the same effect as calling cue completion fish | source in a fish environment: completions don't work, and the situation's even worse than with no completions at all as even file names no longer complete. This is with fish v3.4.1 on Gentoo Linux.
What did you expect to see?
I expected completions to do something.
What did you see instead?
Completions don't do anything, i.e., e.g., typing cue and hitting Tab generates no suggestions, and it's the same for cue v + Tab or hitting that key at any other point within or at the end of a command line, even when it should suggest files.
The completion script, which cobra generates, requires that "__complete" subcommand outputs information about completion.
Such like
> cue __complete "comp"
completion Generate the autocompletion script for the specified shell
:4
But for some reason, cue __complete doesn't output the information. Actually it outputs
> cue __complete "comp"
cannot find package "comp"
I guess it is caused by a way of handling of user-defined commands of cue.
Can you please try again with the latest master version? I've just updated our version of cobra as part of a refactor, so if there were any issues with upstream cobra and its fish shell support, they might have been fixed. We don't have anything special on our end for any of the shells.
Sorry for late. I tried with latest master "6c92698" and it seems functioning normally. Thank you.
Thanks!