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

Re: (forw) --help able programs and completion]



On Jun 26,  1:12pm, Sven Wischnowsky wrote:
} Subject: Re: (forw) --help able programs and completion]
}
} > > We have a function to complete the options described by the `--help'
} > > output, it's called `_use_lo'
} > Hmm, a name that really does not explain anything, does it?

It stands for "use long options", because it used to be a wrapper for the
now-defunct _long_options completer (which was completely subsumed by
_arguments some while back).

} > So in order to use it one has to know it first :)
} 
} Yes.

However, note that all it does is call _arguments, which is what 98% of
the completers for other commands also do.  So most commands for which
there is a special completion already have the ability to complete based
on --help output:  It's triggered by completing after `--'.  Try, for
example

	% tar --<TAB>

and watch the fun.

Which reminds me, Sven:  There's still the bug where setting the `menu'
style to `select=N' for some number N is not working at all.  Menu
selection never starts for me.

} The one who wrote it probably should have documented it
} somewhere.
} 
} I /think/ it wasn't me this time.

This is very interesting.

The earliest mention of _use_lo in the zsh-workers archive is PWS saying
"What happened to _use_lo?  I don't remember removing it." just before he
made the 3.1.6-test-1 release.  That's the first time it shows up in my
home CVS repository, too.  The ChangeLog-Release file doesn't mention it
at all until Sven started patching it (and the entire contents except for
the comment at the top have long been Sven's doing, even if he didn't
create the file originally).

Of course, the ChangeLog also doesn't make any mention of when _arguments
acquired the internals of _long_options.

-- 
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