8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e3ae473 + 0edb107 commit e799e8bCopy full SHA for e799e8b
src/Symfony/Component/Console/Resources/completion.bash
@@ -11,13 +11,14 @@ _sf_{{ COMMAND_NAME }}() {
11
local sf_cmd="${COMP_WORDS[0]}"
12
13
# for an alias, get the real script behind it
14
- if [[ $(type -t $sf_cmd) == "alias" ]]; then
+ sf_cmd_type=$(type -t $sf_cmd)
15
+ if [[ $sf_cmd_type == "alias" ]]; then
16
sf_cmd=$(alias $sf_cmd | sed -E "s/alias $sf_cmd='(.*)'/\1/")
- else
17
+ elif [[ $sf_cmd_type == "file" ]]; then
18
sf_cmd=$(type -p $sf_cmd)
19
fi
20
- if [ ! -x "$sf_cmd" ]; then
21
+ if [[ $sf_cmd_type != "function" && ! -x $sf_cmd ]]; then
22
return 1
23
24
0 commit comments