Merge pull request #23092 from albers/completion-dockerd
bash completion for dockerd
This commit is contained in:
commit
d305b0385c
1 changed files with 9 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue