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

Re: PATCH: Re: _expand doesn't do brace expansion?



On Jun 16,  9:50am, Sven Wischnowsky wrote:
} Subject: PATCH: Re: _expand doesn't do brace expansion?
}
} About the `a{b,c}<TAB>': of course this discussion now got me thinking 
} about it again, but this is horrible. There are a few things that I
} never changed in all my work on the completion code from 2.4.xxx
} on. One of them is that the completion code only ever has to work on
} one string. Trying to implement the above would change that and
} currently I don't even know where to place the loop over the possible
} prefixes/suffixes.

My inclination would be not to change the C code for this, but instead
to make the shell code expand the braces, generate completions for each
resulting string separately, and then mash them back together somehow.

Of course the "mash them back together" is the hard part, but if you
don't try to compute intersections it's just chopping off each of the
different prefixes and sticking on the original (with unexpanded braces)
from the line.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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