Skip to content

Commit

Permalink
[FIX] Fixes issue with hirak/prestissimo
Browse files Browse the repository at this point in the history
Trying to get options for `update` subcommand can result in long
waiting period an seemingly unresponsive bach completion when
composer plugin hirak/prestissimo is being used.
The latter will prefetch repositories whenever encountering the
subcommands `install`, `update` and the likes. When a project uses may
dependencies and repositories, this can take a while. An issue has also
been filed with prestissimo plugin (see hirak/prestissimo#225)
yet using the `help [command]` subcommand in favor to `[command] -h`
in order to retrieve all available options seems more reliable anyway.
  • Loading branch information
troggybrains committed Jun 1, 2020
1 parent 228be8e commit 88422d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion composer-autocomplete
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function _composer_scripts() {
# Complete the arguments to some of the commands.
#
if [ "$subcmd" != "${COMP_WORDS[0]}" ] ; then
local opts=$("$cmd" "$subcmd" -h --no-ansi 2> /dev/null | tr -cs '[=-=][:alpha:]_' '[\n*]' | grep '^-')
local opts=$("$cmd" help "$subcmd" --no-ansi 2> /dev/null | tr -cs '[=-=][:alpha:]_' '[\n*]' | grep '^-')
case "$subcmd" in
"run-script")
# Complete scripts for composer "run-script" command.
Expand Down

0 comments on commit 88422d8

Please sign in to comment.