Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8e34f9a

Browse filesBrowse files
committed
bug #47022 [Console] get full command path for command in search path (remicollet)
This PR was squashed before being merged into the 5.4 branch. Discussion ---------- [Console] get full command path for command in search path | 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 ``` Commits ------- ae57aee [Console] get full command path for command in search path
2 parents 23506ce + ae57aee commit 8e34f9a
Copy full SHA for 8e34f9a

File tree

1 file changed

+3
-1
lines changed
Filter options

1 file changed

+3
-1
lines changed

‎src/Symfony/Component/Console/Resources/completion.bash

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Resources/completion.bash
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ _sf_{{ COMMAND_NAME }}() {
1313
# for an alias, get the real script behind it
1414
if [[ $(type -t $sf_cmd) == "alias" ]]; then
1515
sf_cmd=$(alias $sf_cmd | sed -E "s/alias $sf_cmd='(.*)'/\1/")
16+
else
17+
sf_cmd=$(type -p $sf_cmd)
1618
fi
1719

18-
if [ ! -f "$sf_cmd" ]; then
20+
if [ ! -x "$sf_cmd" ]; then
1921
return 1
2022
fi
2123

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.