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

Re: PATCH: expansion



Oliver Kiddle wrote:

> Peter Stephenson wrote:
> > 
> > > Glob expansion including tilde expansion was the final annoyance that
> > > made me stop using _expand altogether.
> > 
> > You might want to try again with the latest keep-prefix style (which has a
> > sensible default) to see if it's any better, and what if anything remains
> > to do.
> 
> That's certainly better but it has reminded me why I stopped using
> _expand:
> 
> cd ~+<tab> expands, even with keep-prefix. I use the autopushd option
> and really like being able to do cd ~+<tab and using the list of
> directories to return to a previous directory.
> 
> Similar to this is the following:
> hash -d abc=whatever
> hash -d abcd=whatever
> 
> I'm always used to completion not doing anything where there is more
> than one match so I don't like it when ~abc<tab> expands ~abc.

Hm, do you want it to ever expand tildes at all? We could add more
fine-grained control over the kinds of substitutions tried.

> One thing which I like about the way expand-or-complete works is that
> for example, $HOME<tab> will expand but $HOME/<tab> doesn't. In general,
> I prefer variables and tildes not to be expanded but in some cases I
> specifically want them expanded and if I press tab immediately after
> something, I've probably conciously thought to do the expansion.

Yes, that was always the problem with expansion -- guessing if the
user wants it or not. Hm, maybe some kind of expand-ambiguous style.

Does anyone have other ideas for conditions when to expand or not?
Let's collect them.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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