Move filtering to __docker_complete_services, as suggested by @albers

Signed-off-by: Morten Hekkvang <morten.hekkvang@sbab.se>
(cherry picked from commit 6ebcc211a7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Morten Hekkvang 2019-09-10 16:05:25 +02:00 committed by Sebastiaan van Stijn
parent c70ce79adc
commit 9447d7431b
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 2 additions and 2 deletions

View File

@ -561,7 +561,7 @@ __docker_services() {
shift
fi
__docker_q service ls -q --format "$format" --filter "name=$1"
__docker_q service ls --quiet --format "$format" "$@"
}
# __docker_complete_services applies completion of services based on the current
@ -573,7 +573,7 @@ __docker_complete_services() {
current="$2"
shift 2
fi
COMPREPLY=( $(__docker_services "$@" "$current") )
COMPREPLY=( $(__docker_services "$@" --filter "name=$current") )
}
# __docker_tasks returns a list of all task IDs.