zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: man -l (local-file) completion
@ 2000-09-03 21:43 Clint Adams
  2000-09-04  6:17 ` Andrej Borsenkow
  0 siblings, 1 reply; 2+ messages in thread
From: Clint Adams @ 2000-09-03 21:43 UTC (permalink / raw)
  To: zsh-workers

This is a quick hack to have files completed for 'man -l' rather than
manpages.  This is good for the man-db used by Debian.  The only other
man I can think of that uses -l is Solaris, and though it has a different
meaning, I don't think completing manpages nor filenames is particularly
useful there, so this shouldn't really hurt.

This should naturally be subsumed by more comprehensive options handling.

Index: Completion/User/_man
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_man,v
retrieving revision 1.5
diff -u -r1.5 _man
--- Completion/User/_man	2000/07/19 09:03:30	1.5
+++ Completion/User/_man	2000/09/03 21:37:42
@@ -4,6 +4,10 @@
 
 local rep expl star approx mrd
 
+if [[ $words[1] == man ]] && (( $words[(I)-l] + $words[(I)--local-file] )); then
+  _files || return 0
+fi
+
 if [[ $compstate[pattern_match] != [^*] ]]; then
   # If a string other than *, we just want correction, so no `*'.
   star='*'


^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: PATCH: man -l (local-file) completion
  2000-09-03 21:43 PATCH: man -l (local-file) completion Clint Adams
@ 2000-09-04  6:17 ` Andrej Borsenkow
  0 siblings, 0 replies; 2+ messages in thread
From: Andrej Borsenkow @ 2000-09-04  6:17 UTC (permalink / raw)
  To: Clint Adams, zsh-workers

> 
> This is a quick hack to have files completed for 'man -l' rather than
> manpages.  This is good for the man-db used by Debian.  The only other
> man I can think of that uses -l is Solaris, and though it has a different
> meaning, I don't think completing manpages nor filenames is particularly
> useful there, so this shouldn't really hurt.
> 
> This should naturally be subsumed by more comprehensive options handling.
> 


Yes, it looks like _man is next to use _arguments.

-andrej 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-09-04  6:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-03 21:43 PATCH: man -l (local-file) completion Clint Adams
2000-09-04  6:17 ` Andrej Borsenkow

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).