To list all docker repositories I need to use an asterisk. But I am forced to add quotes because zsh globbing catches the asterisk.
sudo docker image list "hub.local/*"
I try aliasing with noglob, but sudo will fail, and docker needs sudo
alias docker="noglob docker"
I thought I could set zsh to not complain when it fails to match, but it seems zsh will remove the asterisk anyway.
setopt nomatch
I want to either disable zsh globbing entirely, or get zsh to pass through the globbing character if it fails to match. Or possibly set zsh globbing to behave like bash. I want to get around typing quotes all the time.
docker
? Is it a list of filenames or a string with a*
at the end? If it's a string with a*
at the end, quoting that string is the correct way of doing it. The question is otherwise a duplicate of Getting sudo to work for an alias and other similar questions. – Kusalananda Oct 07 '19 at 07:51setopt +o nomatch
, notsetopt nomatch
. – muru Oct 07 '19 at 07:53sudo noglob docker
still fails after settingsalias sudo="sudo "
– caduceus Oct 07 '19 at 08:46