add --format flag to docker info
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp> Upstream-commit: dc38c9a04705f0a9ad3e007f7869cfb6a8a3a8b8 Component: engine
This commit is contained in:
@ -1290,9 +1290,15 @@ _docker_import() {
|
||||
}
|
||||
|
||||
_docker_info() {
|
||||
case "$prev" in
|
||||
--format|-f)
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$cur" in
|
||||
-*)
|
||||
COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
|
||||
COMPREPLY=( $( compgen -W "--format -f --help" -- "$cur" ) )
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
@ -200,6 +200,8 @@ complete -c docker -A -f -n '__fish_seen_subcommand_from import' -l help -d 'Pri
|
||||
|
||||
# info
|
||||
complete -c docker -f -n '__fish_docker_no_subcommand' -a info -d 'Display system-wide information'
|
||||
complete -c docker -A -f -n '__fish_seen_subcommand_from info' -s f -l format -d 'Format the output using the given go template'
|
||||
complete -c docker -A -f -n '__fish_seen_subcommand_from info' -l help -d 'Print usage'
|
||||
|
||||
# inspect
|
||||
complete -c docker -f -n '__fish_docker_no_subcommand' -a inspect -d 'Return low-level information on a container or image'
|
||||
@ -393,6 +395,8 @@ complete -c docker -A -f -n '__fish_seen_subcommand_from unpause' -a '(__fish_pr
|
||||
|
||||
# version
|
||||
complete -c docker -f -n '__fish_docker_no_subcommand' -a version -d 'Show the Docker version information'
|
||||
complete -c docker -A -f -n '__fish_seen_subcommand_from version' -s f -l format -d 'Format the output using the given go template'
|
||||
complete -c docker -A -f -n '__fish_seen_subcommand_from version' -l help -d 'Print usage'
|
||||
|
||||
# wait
|
||||
complete -c docker -f -n '__fish_docker_no_subcommand' -a wait -d 'Block until a container stops, then print its exit code'
|
||||
|
||||
@ -1709,7 +1709,8 @@ __docker_subcommand() {
|
||||
;;
|
||||
(info|version)
|
||||
_arguments $(__docker_arguments) \
|
||||
$opts_help && ret=0
|
||||
$opts_help \
|
||||
"($help -f --format)"{-f=,--format=}"[Format the output using the given go template]:template: " && ret=0
|
||||
;;
|
||||
(inspect)
|
||||
local state
|
||||
|
||||
Reference in New Issue
Block a user