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

Merge pull request #31881 from albers/completion-ps--format

Add bash completion for `node|service|stack ps --format`
This commit is contained in:
Vincent Demeester 2017-03-16 14:56:26 +01:00 committed by GitHub
commit c8d109842a

View file

@ -2942,11 +2942,14 @@ _docker_service_ps() {
__docker_nospace __docker_nospace
return return
;; ;;
--format)
return
;;
esac esac
case "$cur" in case "$cur" in
-*) -*)
COMPREPLY=( $( compgen -W "--filter -f --help --no-resolve --no-trunc --quiet -q" -- "$cur" ) ) COMPREPLY=( $( compgen -W "--filter -f --format --help --no-resolve --no-trunc --quiet -q" -- "$cur" ) )
;; ;;
*) *)
local counter=$(__docker_pos_first_nonflag '--filter|-f') local counter=$(__docker_pos_first_nonflag '--filter|-f')
@ -3480,11 +3483,14 @@ _docker_node_ps() {
__docker_nospace __docker_nospace
return return
;; ;;
--format)
return
;;
esac esac
case "$cur" in case "$cur" in
-*) -*)
COMPREPLY=( $( compgen -W "--filter -f --help --no-resolve --no-trunc" -- "$cur" ) ) COMPREPLY=( $( compgen -W "--filter -f --format --help --no-resolve --no-trunc --quiet -q" -- "$cur" ) )
;; ;;
*) *)
__docker_complete_nodes --add self __docker_complete_nodes --add self
@ -3973,11 +3979,14 @@ _docker_stack_ps() {
__docker_nospace __docker_nospace
return return
;; ;;
--format)
return
;;
esac esac
case "$cur" in case "$cur" in
-*) -*)
COMPREPLY=( $( compgen -W "--all -a --filter -f --help --no-resolve --no-trunc" -- "$cur" ) ) COMPREPLY=( $( compgen -W "--all -a --filter -f --format --help --no-resolve --no-trunc --quiet -q" -- "$cur" ) )
;; ;;
*) *)
local counter=$(__docker_pos_first_nonflag '--filter|-f') local counter=$(__docker_pos_first_nonflag '--filter|-f')