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

Merge pull request #22452 from cpuguy83/fix_zsh_completion_psformat

Make zsh completion work when ps output is custom
This commit is contained in:
Vincent Demeester 2016-05-02 17:39:46 +02:00
commit 2a6980c5cb

View file

@ -57,7 +57,7 @@ __docker_get_containers() {
type=$1; shift type=$1; shift
[[ $kind = (stopped|all) ]] && args=($args -a) [[ $kind = (stopped|all) ]] && args=($args -a)
lines=(${(f)"$(_call_program commands docker $docker_options ps --no-trunc $args)"}) lines=(${(f)"$(_call_program commands docker $docker_options ps --format 'table' --no-trunc $args)"})
# Parse header line to find columns # Parse header line to find columns
local i=1 j=1 k header=${lines[1]} local i=1 j=1 k header=${lines[1]}