Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Brace completion and spaces



I'm having some trouble with tabcompleting in constructs like
foo/{bar,<tab> when foo and/or bar and/or the element to complete
contains spaces. This is especially common when trying to play two or
three mp3 files from an album. I usually resort to foo/{01,03,05}*.mp3
or so.

This works fine:
zsh -f
autoload compinit
compinit -C #the -C just inhibits overwriting my .zcompdump
mkdir abc
touch abc/{abc,def}
ls abc/{abc,<tab>
this lets me complete both abc/abc and abc/def.

This however:
zsh -f
autoload compinit
compinit -C
mkdir a\ b\ c
touch a\ b\ c/{a\ b\ c,d\ e\ f}
ls a\ b\ c/{<tab>    #this changes the input to "ls a\ b\ {c/", subsequent
                     #tabs then move the { left until it says "ls a\{ b\ c/"
ls a\ b\ c/{a\ b\ c,<tab>   #this produces no matches and just beeps
ls a\ b\ c/{a<tab>          #this successfully completes to "a\ b\ c/{a\ b\ c,"

Further experimenting shows that the problem only seems to happen when
the dir contains spaces, it doesn't matter if the files inside do.

-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author