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

Tab completion of multiple files using curly braces



With my current setup tab completion of a word with curly braces in it
(e.g. foo{bar,biz}) Zsh expands it.  For example:

% diff ./{old,new}/obnoxiously_long_f<TAB>

% diff ./old/obnoxiously_long_f ./new/obnoxiously_long_f

I'd really like to have the shell avoid expansion and instead look for
possible completions using the union of the file names under all
expansions.  For example:

% diff ./{old,new}/obnoxiously_long_f<TAB>

% diff ./{old,new}/obnoxiously_long_file_name.
  obnoxiously_long_file_name.c obnoxiously_long_file_name.h

where obnoxiously_long_file_name.c and obnoxiously_long_file_name.h
exist in both old and new.  I imagine it wouldn't be too difficult to
write a completion function for this and I already have the completer
set up to favor completion over expansion.  Is this completion function
already implemented?


~Allan



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