10000 [Console] get full command path for command in search path · symfony/symfony@ae57aee · GitHub
[go: up one dir, main page]

Skip to content

Commit ae57aee

Browse files
remicolletfabpot
authored andcommitted
[Console] get full command path for command in search path
1 parent 23506ce commit ae57aee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines 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=< 69BA span class="pl-pds">$(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