I have a bunch of filenames with spaces:
[~/music]% ls
Acid Eater - Black Fuzz On Wheels.ogg Angel'in Heavy Syrup 4.mp3
Akalé Wubé - Akalé Wubé.opus Astor Piazzolla & Gary Burton - The New Tango.mp3
Allen Toussaint - The Bright Mississippi.mp3 B.B. King - Live at the Regal.mp3
Angel'in Heavy Syrup 1.opus Bar Kokhba Sextet - Lucifer.opus
Angel'in Heavy Syrup 2.opus Billy Bang - Vietnam the Aftermath.mp3
Angel'in Heavy Syrup 3.mp3
Completion inserts escape characters for the spaces (which also means there isn't enough space to display it in two columns):
[~/music]% mpv <Tab>
Acid\ Eater\ -\ Black\ Fuzz\ On\ Wheels.ogg
Akalé\ Wubé\ -\ Akalé\ Wubé.opus
Allen\ Toussaint\ -\ The\ Bright\ Mississippi.mp3
Angel\'in\ Heavy\ Syrup\ 1.opus
Angel\'in\ Heavy\ Syrup\ 2.opus
Angel\'in\ Heavy\ Syrup\ 3.mp3
Angel\'in\ Heavy\ Syrup\ 4.mp3
Astor\ Piazzolla\ \&\ Gary\ Burton\ -\ The\ New\ Tango.mp3
B.B.\ King\ -\ Live\ at\ the\ Regal.mp3
Bar\ Kokhba\ Sextet\ -\ Lucifer.opus
Billy\ Bang\ -\ Vietnam\ the\ Aftermath.mp3
This makes sense, but also hard to read; I would like:
[~/music]% mpv <Tab>
Acid Eater - Black Fuzz On Wheels.ogg Angel'in Heavy Syrup 4.mp3
Akalé Wubé - Akalé Wubé.opus Astor Piazzolla & Gary Burton - The New Tango.mp3
Allen Toussaint - The Bright Mississippi.mp3 B.B. King - Live at the Regal.mp3
Angel'in Heavy Syrup 1.opus Bar Kokhba Sextet - Lucifer.opus
Angel'in Heavy Syrup 2.opus Billy Bang - Vietnam the Aftermath.mp3
Angel'in Heavy Syrup 3.mp3
[~/music]% mpv Acid<Tab>
# Completes to:
[~/music]% mpv Acid\ Eater\ -\ Black\ Fuzz\ On\ Wheels.ogg
# It's okay to type escapes on the cmdline; it's just the display.
[~/music]% mpv Angel\'in\ H<Tab>
Angel'in Heavy Syrup 1.opus Angel'in Heavy Syrup 3.mp3
Angel'in Heavy Syrup 2.opus Angel'in Heavy Syrup 4.mp3
I spent some time reading through zshcompsys(1), but I don't really see a way to do this.
mpv '<Tab>
(and zsh will complete a'...'
quoted string). Same with"
or$'
. You'll still see backslashes if there are characters that need escaping in those.