-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console] Autocomplete feature is not working when using alias #44461
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
Comments
Also noticed that if I add that |
bin/console se [TAB] works |
Hi! Thanks for the reports. Unfortunately, both of them are "can't fix" issues. As "application writers", the only thing we can do is provide a completion script to the shell. In the end, it's up to the shell's logic to run our completion script in the correct cases. In bash, you configure the bash completion utility using the
I'm not sure why The same applies to If there is someone with great bash skills that is aware of a way to make aliases work, please contribute or comment :) Otherwise, I'm afraid all I can do is close this one. |
Imho - we should at least keep this open a bit more - maybe someone who has some insights for this would spot this easier. |
Previously I used - https://github.com/bamarni/symfony-console-autocomplete - for this and it worked with |
That's interesting. Which install method did you use for the autocomplete functionality? |
Just couple of things on my
or did you mean how I setup that Symfony autocomplete feature in my setup? |
Are you aware that autocomplete feature is provided by the shell at OS level? |
Yes, I know that - but when I was using that - https://github.com/bamarni/symfony-console-autocomplete - autocomplete also worked with |
This PR was merged into the 5.4 branch. Discussion ---------- [Console] Handle alias in completion script | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #44461 | License | MIT | Doc PR | - Detect when completion is triggered by an alias and get the underlying command. Tip extracted from [bamarni/symfony-console-autocomplete](https://github.com/bamarni/symfony-console-autocomplete/blob/v1.4.2/resources/bash/default.php#L7-L10). Works well with such alias: ```console alias console=bin/console ``` Doesn't work with these aliases (command name is not the 1st part of the alias): ```console alias console='APP_ENV=test bin/console' ``` When alias has a different name, the name in the completion script must be updated. Commits ------- f3c196a Handle alias in completion script
Symfony version(s) affected
5.4.0
Description
If I use bash alias like;
then autocomplete feature doesn't work when I try following;
but it works as expected when I use it like;
How to reproduce
See the description.
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: