mirror of
https://github.com/containers/podman.git
synced 2025-06-22 01:48:54 +08:00
Merge pull request #4740 from edsantiago/zsh_completion_flagfix
zsh completion: ignore multi-line output in Flags
This commit is contained in:
@ -47,6 +47,7 @@ _read_podman_flags() {
|
|||||||
# The result will be, e.g. '-f,--foo=string Description of Option'
|
# The result will be, e.g. '-f,--foo=string Description of Option'
|
||||||
_call_program podman podman "$@" --help |\
|
_call_program podman podman "$@" --help |\
|
||||||
sed -n -e '0,/^Flags:/d' -e '/^$/q;p' |\
|
sed -n -e '0,/^Flags:/d' -e '/^$/q;p' |\
|
||||||
|
grep '^ \+-' |\
|
||||||
sed -e 's/^ *//' -e 's/^\(-.,\) --/\1--/' |\
|
sed -e 's/^ *//' -e 's/^\(-.,\) --/\1--/' |\
|
||||||
sed -e 's/^\(-[^ ]\+\) \([^ ]\+\) /\1=\2 /' |\
|
sed -e 's/^\(-[^ ]\+\) \([^ ]\+\) /\1=\2 /' |\
|
||||||
while read flags desc;do
|
while read flags desc;do
|
||||||
|
Reference in New Issue
Block a user