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

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

Merged
merged 1 commit into from Jul 22, 2022

Conversation

remicollet
Copy link
Contributor

@remicollet remicollet commented Jul 22, 2022

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 remicollet requested a review from chalasr as a code owner Jul 22, 2022
@carsonbot carsonbot added this to the 6.2 milestone Jul 22, 2022
@remicollet
Copy link
Contributor Author

@remicollet remicollet commented Jul 22, 2022

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 Jul 22, 2022
@remicollet
Copy link
Contributor Author

@remicollet remicollet commented Jul 22, 2022

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 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

@dkarlovi dkarlovi commented Jul 22, 2022

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

fabpot
fabpot approved these changes Jul 22, 2022
@fabpot
Copy link
Member

@fabpot fabpot commented Jul 22, 2022

Thank you @remicollet.

@fabpot fabpot merged commit 8e34f9a into symfony:5.4 Jul 22, 2022
4 of 5 checks passed
@remicollet remicollet deleted the issue-path branch Jul 22, 2022
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.

None yet

8 participants