1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

bash completion for dockerd

Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
Harald Albers 2016-05-29 07:09:05 -07:00
parent 6184518fe3
commit 5f1c5b28a7

View file

@ -2308,6 +2308,14 @@ _docker() {
(( counter++ ))
done
local binary="${words[0]}"
if [[ $binary == dockerd ]] ; then
# for the dockerd binary, we reuse completion of `docker daemon`.
# dockerd does not have subcommands and global options.
command=daemon
command_pos=0
fi
local completions_func=_docker_${command}
declare -F $completions_func >/dev/null && $completions_func
@ -2318,4 +2326,4 @@ _docker() {
eval "$__docker_previous_extglob_setting"
unset __docker_previous_extglob_setting
complete -F _docker docker
complete -F _docker docker dockerd