Skip to content

[Console] get full command path for command in search path #47022

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

Merged
merged 1 commit into from
Jul 22, 2022

Conversation

remicollet
Copy link
Contributor

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets
License MIT
Doc PR

Working on composer 2.4.0RC1 will autocompletion

When the command is in the search path, -f fails, so we need to switch to its full path

$ type -p ./composer
./composer

$ type -p composer
/usr/bin/composer

@remicollet
Copy link
Contributor Author

Notice: I also think the -f (file) should be replaced by -x (executable)

@carsonbot carsonbot changed the title get full command path for command in search path [Console] get full command path for command in search path Jul 22, 2022
@remicollet remicollet changed the base branch from 6.2 to 5.4 July 22, 2022 06:48
@remicollet
Copy link
Contributor Author

Notice (but this is another issue), that alias case may be broken if contains options,
e.g. alias composer /usr/local/bin/composer --verbose

@Seldaek
Copy link
Member

Seldaek commented Jul 22, 2022

cc @wouterj too as he did the original implementation.

@chalasr chalasr modified the milestones: 6.2, 5.4 Jul 22, 2022
@dkarlovi
Copy link
Contributor

Two confirmations it works with this patch applied: composer/composer#10961

@fabpot
Copy link
Member

fabpot commented Jul 22, 2022

Thank you @remicollet.

@fabpot fabpot merged commit 8e34f9a into symfony:5.4 Jul 22, 2022
@remicollet remicollet deleted the issue-path branch July 22, 2022 11:47
This was referenced Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants