zsh export command separator, different behaviour than bash

Viewed 46
export do="--dry-run=client -o yaml"
k run tmp2 --image busybox $do -o yaml > test.yaml --command -- sh -c "sleep 1d"

in bash, if I set the above shortcut, bash interprets correctly that do is two options --dry-run=client and -o yaml that are passed into kubectl command.

However zsh seems interpret the same shortcut differently, it interprets as one option, i.e. --dry-run=client -o yaml, as a result, kubectl gave error about incorrect option.

error: Invalid dry-run value (client -o yaml). Must be "none", "server", or "client".

How should I do this in zsh?

0 Answers
Related