Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Tab completion of multiple files using curly braces
- X-seq: zsh-users 13870
- From: Allan Caffee <allan.caffee@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxx>
- Subject: Tab completion of multiple files using curly braces
- Date: Fri, 20 Feb 2009 09:14:52 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=m8paDU7NoDs1Rz4kXxU50h9C88R31ktFkpiL4IFmJQ4=; b=TCp3YPwfZW6rMkzlgEuLo6aql0w6b2jaW3R6ahTZTL4wv6ZLjZ3ZY1iXF3DdL7DJAE jjYk/cxpRE8cZdVdWeVZKdFRDtCRP1UXIf+OX2T/KfJg6DLH85gR7QxWpV7k64C2fkhp jIcYTVTZHQxE6Y2V4cqgj5O0Lc63TOwxGnD/8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=T5ogyj2pSf6XRp3JdWdHa/4h0K0sKzNekRrt29mW1GAq/xhZXA7Dg5g0cbopU+RHgx m5dX0/AlNMDPhR38QAc7V/im9XrlHTe4pBSk0hk5ouplYzR6kiH1Nt1jeJBb14jATU7h fGYP1b+qFkjLK/K253kwTGdL+HXmwbQNAj+3k=
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
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