mirror of
https://github.com/docker/compose.git
synced 2025-04-08 17:05:13 +02:00
zsh autocomplete: fix missing services issue for build/pull commands
Previously, the autocomplete for the build/pull commands would only add services for which build/image were the _first_ keys, respectively, in the docker-compose file. This commit fixes this, so the appropriate services are listed regardless of the order in which they appear Signed-off-by: Andre Eriksson <aepubemail@gmail.com>
This commit is contained in:
parent
d990f7899c
commit
048408af48
@ -52,7 +52,8 @@ __docker-compose_services_with_key() {
|
||||
| sed -n -e '/^services:/,/^[^ ]/p' \
|
||||
| sed -n 's/^ //p' \
|
||||
| awk '/^[a-zA-Z0-9]/{printf "\n"};{printf $0;next;}' \
|
||||
| awk -F: -v key=": +$1:" '$0 ~ key {print $1}' \
|
||||
| grep " \+$1:" \
|
||||
| sed "s/:.*//g" \
|
||||
| grep -Ev "$already_selected"
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user