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

Re: run-help's man arguments



On Jun 8,  9:52am, Peter Stephenson wrote:
} Subject: Re: run-help's man arguments
}
} Bart Schaefer wrote:
} > You have a point there.  PWS, how did you manage to get run-help to
} > pass the entire locate command line to "man $@:t"?
} 
} It seems I'm using this widget.

(Sound of hand smacking forehead.)  I completely misunderstood your
original mail on this thread and confused the widget with the run-help
function that you patched.

} local -a line
} 
} line=(${(qq)${(z)BUFFER}})
} zle push-line
} BUFFER="run-help ${line}"
} zle accept-line

I can't find that anywhere (except this) in the zsh lists archives back
to 2003 (which I have where I can grep them).  Where did you find it, or
why did you write it?  (E.g., did you start trying it because you saw
the $@:t in run-help, or did you find $@:t because you were trying this?)

Incidentally $@:t has other problems with this widget, namely, it yields
an array consisting of the tail of every word on the command line, which
is probably not what you want.

On Jun 8,  3:03pm, Peter Stephenson wrote:
}
} I haven't been finding it *that* useful.  With a widget like this,
} run-help could be made cleverer in this respect by offering to give help
} for words following coproc, noglob, etc.

Hmm, run-help already does that for some keywords:

schaefer<503> coproc foo
schaefer<503> run-help foo  
foo not found
No manual entry for foo
schaefer<504> coproc foo

It doesn't do so for "noglob", "exec", etc. so I don't know exactly what
it is about coproc that's magical.



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