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

Re: PATCH: completions for su and implicit fg/bg



Peter Stephenson wrote:

> Oliver Kiddle wrote:
> > First, is a patch to _first which completes jobs after an initial % on
> > the command line.
> 
> I think the code in _first was deliberately left commented because it gets
> run every time, but the impact of this change is minimal.

Right. And since we only want it in command position, we should
probably put it in _command_names.

> > This is useful when foregrounding or backgrounding a
> > process without fg/bg. This feature seems to be undocumented actually.
> 
> Hmm, I thought it was an option, but it seems it's run unconditionally at
> the top of execcmd().  What is an option is AUTO_RESUME.

It's in builtins.yo under `bg' and `fg'.

> > I've included a basic completion for the
> > common shells which just does the -c option.
> 
> It really needs to be told to treat a (possibly quoted) word after -c as a
> complete command line.  I've forgotten how to do that.

It's `compset -q' -- and with that I can repeat the question I asked
at the time when I sent the completion-quoting-patch: currently the
`-q' option only has an effect if the word on the command line is
quoted -- should we change it to work on unquoted strings, too?

And: nothing against giving _normal (an) optional argument(s) that
will be put at the front of $words. (_normal is one of the older
functions that survived (with changes) the transition from reporting
command line words as positional parameters to the $words array we
have now; that's why nobody made it accept arguments again, I think).

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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