Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: 3.1.6-pws-3: _man
- X-seq: zsh-workers 7740
- From: Tanaka Akira <akr@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Re: PATCH: 3.1.6-pws-3: _man
- Date: 09 Sep 1999 20:21:21 +0900
- In-reply-to: Peter Stephenson's message of "Thu, 09 Sep 1999 11:44:30 +0200"
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <199909090944.LAA10206@xxxxxxxxxxxx>
This is another patch for _man to handle gzipped and/or SGML manual.
Index: Completion/User/_man
===================================================================
RCS file: /projects/zsh/zsh/Completion/User/_man,v
retrieving revision 1.1.1.6
diff -u -F^( -r1.1.1.6 _man
--- _man 1999/09/09 09:47:08 1.1.1.6
+++ _man 1999/09/09 11:19:28
@@ -1,6 +1,6 @@
#compdef man
-setopt localoptions rcexpandparam
+setopt localoptions rcexpandparam extendedglob
local rep expl star approx
@@ -14,12 +14,14 @@
approx="(#a${_comp_correct})"
fi
+# `sman' is the SGML manual directory for Solaris 7.
+
if [[ $words[2] = (<->*|ln) ]]; then
rep=(
- $manpath/(man|cat)${words[2]}/${~approx}$PREFIX${~star}$SUFFIX.<->*(N:t:r) )
+ $manpath/(sman|man|cat)${words[2]}/${~approx}$PREFIX${~star}$SUFFIX.<->*(N:t) )
else
- rep=( $manpath/(man|cat)*/${~approx}$PREFIX${~star}$SUFFIX.<->*(N:t:r) )
+ rep=( $manpath/(sman|man|cat)*/${~approx}$PREFIX${~star}$SUFFIX.<->*(N:t) )
fi
_description expl 'manual page'
-(( $#rep )) && compadd "$expl[@]" - $rep
+(( $#rep )) && compadd "$expl[@]" - ${rep%%.[^.]##(.gz|)}
--
Tanaka Akira
Messages sorted by:
Reverse Date,
Date,
Thread,
Author