fix: remove asterisk from docker command suggestions

Some commands in the output of `docker` show up with an asterisk, like
app, build, buildx or scan. This tweak removes that so that the
asterisk is not filled in when choosing those commands.

Signed-off-by: Marc Cornellà <hello@mcornella.com>
(cherry picked from commit b1f18b700e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Marc Cornellà 2022-04-06 19:04:52 +02:00 committed by Sebastiaan van Stijn
parent aa7e414fdc
commit 308624c3b1
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 1 additions and 1 deletions

View File

@ -2652,7 +2652,7 @@ __docker_commands() {
then then
local -a lines local -a lines
lines=(${(f)"$(_call_program commands docker 2>&1)"}) lines=(${(f)"$(_call_program commands docker 2>&1)"})
_docker_subcommands=(${${${(M)${lines[$((${lines[(i)*Commands:]} + 1)),-1]}:# *}## #}/ ##/:}) _docker_subcommands=(${${${(M)${lines[$((${lines[(i)*Commands:]} + 1)),-1]}:# *}## #}/\*# ##/:})
_docker_subcommands=($_docker_subcommands 'daemon:Enable daemon mode' 'help:Show help for a command') _docker_subcommands=($_docker_subcommands 'daemon:Enable daemon mode' 'help:Show help for a command')
(( $#_docker_subcommands > 2 )) && _store_cache docker_subcommands _docker_subcommands (( $#_docker_subcommands > 2 )) && _store_cache docker_subcommands _docker_subcommands
fi fi