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

Autocompletion not working with Acquia CLI #66

Closed
danepowell opened this issue Oct 18, 2021 · 5 comments · Fixed by #67
Closed

Autocompletion not working with Acquia CLI #66

danepowell opened this issue Oct 18, 2021 · 5 comments · Fixed by #67

Comments

@danepowell
Copy link
Contributor

I'd like to enable autocompletion for Acquia CLI, which is a Symfony Console app. On my local setup, autocompletion works for other Symfony Console apps (i.e. Composer) but not Acquia CLI. Is some specific action required to enable integration?

If I run symfony-autocomplete acli it seems to dump the autocompletion file as expected, but simply running acli [TAB] produces no results, while composer [TAB] does.

@ktomk
Copy link
Collaborator

ktomk commented Oct 18, 2021

Is some specific action required to enable integration?

Not as otherwise necessary. Have a hard time to find an idea why it should be different for acli. Maybe they do something specific, the shell's autocomplete is unable to detect it?

Perhaps non-portable characters or names not consisting entirely of the Portable Filename Character Set?

If you leave more information it might shed some light.

@danepowell
Copy link
Contributor Author

danepowell commented Oct 18, 2021

There appears to be a whitelist of supported packages in DumpCommand.php, adding acli fixes it: #67

If that's not a whitelist, then what's the purpose of that list, and how would a package not on that list be discovered?

I assume I'm missing something here, because the README strongly implies that any package should work out of the box, not just packages on that list.

@ktomk
Copy link
Collaborator

ktomk commented Oct 18, 2021

Not sure this is a whitelist, please compare with #49 for a scenario as well with an issue.

But good to know that 7652c05 is helping you with the issue.

Any chance one of the command-line options allows you to achieve as well w/o the change? Just asking, because I so far as well don't fully grasp this list.

I found this remark (there at #49) interesting:

Roadiz CMS uses a dedicated CLI entry point name bin/roadiz instead of bin/console.

Could it be this is also the case for acli?

@ktomk
Copy link
Collaborator

ktomk commented Oct 18, 2021

Okay, now something comes from memories. This is how I understand it:

You normally ship the completion with the utility (the own symfony console one, like acli in this case). Otherwise (compare #45, #49) for built-in support it needs to be added to the list to be globally available.

So it should be able to add the tooling to the acli build (script/pipeline) and have the completion scripts available within your distribution, so all users of acli can benefit from it (given a supported platform).

So for your original report, the gap likely is to compare against composer here (or any other one of the few entries in the list). Users of acli should already get auto completion by the installing instructions of the utility itself (IMHO, w/o installing additional tooling for it [like this symfony-console-autocomplete]).

Is that an option in your scenario? @danepowell I only took a quick glimpse at acli(1) public repo, it seems to list you as a contributor.

@danepowell
Copy link
Contributor Author

Roadiz CMS uses a dedicated CLI entry point name bin/roadiz instead of bin/console.

Ah, yes, then this is the problem. Acquia CLI uses bin/acli. So that's the reason that the 'tools' list exists: it's a list of known Console entrypoints. I don't see any way for Acquia CLI to solve this other than to add itself to the list of tools. You mention that this can be solved by the tool (i.e. Acquia CLI) itself, but I don't think that's true. Composer, for instance, doesn't have built-in autocompletion that I can find.

I'll update #67 accordingly.

danepowell added a commit to danepowell/symfony-console-autocomplete that referenced this issue Oct 19, 2021
danepowell added a commit to danepowell/symfony-console-autocomplete that referenced this issue Oct 19, 2021
Add Acquia CLI to list of supported tools, and reword sections to make it clear that only tools named console or on the list of default tools are supported out of the box

bamarni#67

bamarni#66
@ktomk ktomk closed this as completed in #67 Oct 24, 2021
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 a pull request may close this issue.

2 participants