You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Completion installation seems to complete, but logs an error at the end of the process. The correct scripts are generated
"error" is output every time you hit tab to attempt to use auto complete.
This happens with my own CLI app that I'm migrating from Caporal 1.x to 2.x as well as with the "pizza" example.
To Reproduce
Clone the repo
npm ci in the root
npm run build in the root
cd examples
npm ci
npm link
pizza --install-completion
Choose zsh
Enter Y when prompted to install the completion to ~/.zshrc
Observe the output. The last statement will be: "error: Unknown command --install-completion"
Reload your shell
enter pizza and hit tab
Observe the output. The word "error" is output next to "pizza ".
Environment informations (please complete the following information):
OS: macOS on an Intel Mac
OS version: 11.0.1
Shell: zsh
Caporal version: 2.0.2 (master branch as of 540bd81)
node: 12.18.3
nvm: 6.14.8
Additional context
I suspected the issue may be tabtab but I cannot reproduce this issue using tabtab's example, which works as expected.
Output from my shell
Output from pizza --install-completion
$ pizza --install-completion
? Which Shell do you use ? zsh
? We will install completion to ~/.zshrc, is it ok ? Yes
=> Tabtab line already exists in~/.zshrc file
=> Tabtab line already exists in~/.config/tabtab/__tabtab.zsh file
=> Wrote completion script to /Users/georgecox/.config/tabtab/pizza.zsh file
=> Tabtab source line added to ~/.zshrc for pizza package.
Make sure to reload your SHELL.
error: Unknown command --install-completion.
Output from entering pizza then hitting tab.
$ pizza error
Running pizza completion also produces an error: "error: Unknown command completion". Since that's what the completion script calls, I'm guessing the completion command isn't getting registered correctly for some reason.
Update 1
Confirmed that the error being thrown when typing pizza + tab is, indeed, "Unknown command completion"
Update 2
It doesn't look like completion has worked at all in v2.x. The unit tests call complete directly and do not test whether it is called when the completion -- ??? command is run.
The text was updated successfully, but these errors were encountered:
Describe the bug
Completion installation seems to complete, but logs an error at the end of the process. The correct scripts are generated
"error" is output every time you hit tab to attempt to use auto complete.
This happens with my own CLI app that I'm migrating from Caporal 1.x to 2.x as well as with the "pizza" example.
To Reproduce
npm ci
in the rootnpm run build
in the rootcd examples
npm ci
npm link
pizza --install-completion
zsh
Y
when prompted to install the completion to~/.zshrc
pizza
and hit tabEnvironment informations (please complete the following information):
Additional context
I suspected the issue may be
tabtab
but I cannot reproduce this issue usingtabtab
's example, which works as expected.Output from my shell
pizza --install-completion
pizza
then hitting tab.pizza completion
also produces an error: "error: Unknown command completion". Since that's what the completion script calls, I'm guessing thecompletion
command isn't getting registered correctly for some reason.Update 1
Confirmed that the error being thrown when typing
pizza
+ tab is, indeed, "Unknown command completion"Update 2
It doesn't look like completion has worked at all in v2.x. The unit tests call
complete
directly and do not test whether it is called when thecompletion -- ???
command is run.The text was updated successfully, but these errors were encountered: