zsh-users
 help / color / mirror / code / Atom feed
* man completion
@ 2007-10-12 23:19 Mildred
  2007-10-13 12:06 ` arno
  0 siblings, 1 reply; 4+ messages in thread
From: Mildred @ 2007-10-12 23:19 UTC (permalink / raw)
  To: zsh-users

Hi,

I noticed that the man command line utility can directly take the
filename of a manpage. And I also noticed that on my system, zsh
doesn't complete filenames for man, even when I put "./" ...

Would it be possible to have this completion too, when we type ./ ?
Or if zsh already have it, please tell me how do I enable it ?

Thanks.

Mildred

-- 
Mildred Ki'lya
E-Mail:	mildred593@online.fr

Site:	<http://mildred632.free.fr/>
XMPP:	<mildred@jabber.fr> (GoogleTalk, Jabber)

GPG:	197C A7E6 645B 4299 6D37 684B 6F9D A8D6 [9A7D 2E2B]


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

* Re: man completion
  2007-10-12 23:19 man completion Mildred
@ 2007-10-13 12:06 ` arno
  2007-10-18 22:21   ` Mildred
  0 siblings, 1 reply; 4+ messages in thread
From: arno @ 2007-10-13 12:06 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 3153 bytes --]

Le samedi 13 octobre 2007, à 01:19:46 +0200, Mildred a écrit :                                                                               
> I noticed that the man command line utility can directly take the                                                                          
> filename of a manpage. And I also noticed that on my system, zsh                                                                           
> doesn't complete filenames for man, even when I put "./" ...                                                                               
>                                                                                                                                            
> Would it be possible to have this completion too, when we type ./ ?                                                                        
> Or if zsh already have it, please tell me how do I enable it ?                                                                             
                                                                                                                                             
Hi,                                                                                                                                          
I don't have the solution, but a workaround: when using man -l, completion shows                                                             
filenames:                                                                                                                                   
                                                                                                                                             
man -l ./<TAB>                                                                                                                               
                                                                                                                                             
According to man manual, man -l is the right way open a file, and:                                                                           
                                                                                                                                             
> When this option is not used, and man fails to find  the page required, before                                                             
> displaying the error message, it attempts to act as if this option was supplied,                                                           
> using the name as a filename and looking for an exact match.                                                                               
                                                                                                                                             
So, zsh completion behaviour seems quite coherent to me.                                                                                     
                                                                                                                                             
arno.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: man completion
  2007-10-13 12:06 ` arno
@ 2007-10-18 22:21   ` Mildred
  2007-10-18 23:23     ` Matthew Wozniski
  0 siblings, 1 reply; 4+ messages in thread
From: Mildred @ 2007-10-18 22:21 UTC (permalink / raw)
  To: zsh-users


Le Sat 13/10/2007 à 14:06 arno à écrit:
> Le samedi 13 octobre 2007, à 01:19:46 +0200, Mildred a
> écrit :                                                                               
> > I noticed that the man command line utility can directly take
> > the filename of a manpage. And I also noticed that on my system,
> > zsh doesn't complete filenames for man, even when I put
> > "./" ... 
> > Would it be possible to have this completion too, when we
> > type ./ ? Or if zsh already have it, please tell me how do I enable
> > it ?                                                                             
>                                                                                                                                              
> Hi,                                                                                                                                          
> I don't have the solution, but a workaround: when using man -l,
> completion shows
> filenames: 
> man
> -l ./<TAB> 
> According to man manual, man -l is the right way open a file,
> and: 
> > When this option is not used, and man fails to find  the page
> > required, before displaying the error message, it attempts to act
> > as if this option was supplied, using the name as a filename and
> > looking for an exact
> > match.                                                                               
>                                                                                                                                              
> So, zsh completion behaviour seems quite coherent to
> me. 
> arno.

I don't know why it doesn't work, but it doesn't:


mildred@kylae:src/ant$ man -l ant.1
man: invalid option -- l
man, version 1.6e

usage: man [-adfhktwW] [section] [-M path] [-P pager] [-S list]
        [-m system] [-p string] name ...

  a : find all matching entries
  c : do not use cat file
  d : print gobs of debugging information
  D : as for -d, but also display the pages
  f : same as whatis(1)
  h : print this help message
  k : same as apropos(1)
  K : search for a string in all pages
  t : use troff to format pages for printing
  w : print location of man page(s) that would be displayed
      (if no name given: print directories that would be searched)
  W : as for -w, but display filenames only

  C file   : use `file' as configuration file
  M path   : set search path for manual pages to `path'
  P pager  : use program `pager' to display pages
  S list   : colon separated section list
  m system : search for alternate system's man pages
  p string : string tells which preprocessors to run
               e - [n]eqn(1)   p - pic(1)    t - tbl(1)
               g - grap(1)     r - refer(1)  v - vgrind(1)


But thanks for your answer. I thought I answered you but apparently the
message never arrived to the mailing list.

-- 
Mildred Ki'lya
E-Mail:	mildred593@online.fr

Site:	<http://mildred632.free.fr/>
XMPP:	<mildred@jabber.fr> (GoogleTalk, Jabber)

GPG:	197C A7E6 645B 4299 6D37 684B 6F9D A8D6 [9A7D 2E2B]


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

* Re: man completion
  2007-10-18 22:21   ` Mildred
@ 2007-10-18 23:23     ` Matthew Wozniski
  0 siblings, 0 replies; 4+ messages in thread
From: Matthew Wozniski @ 2007-10-18 23:23 UTC (permalink / raw)
  To: zsh-users; +Cc: Mildred

On Fri, Oct 19, 2007 at 12:21:48AM +0200, Mildred wrote:
> mildred@kylae:src/ant$ man -l ant.1
> man: invalid option -- l
> man, version 1.6e

mastermind% man --version
man, version 2.4.4, 2007-02-12

Talk to the Darwin Ports people about it... Either they chose to port
a very old version, or they chose to port a different `man' than my
linux distro uses.  Either way, if there's a way to get a version
identifier out of it that distinguishes it from the man that *does*
accept -l, it oughn't be too tough to special-case the Darwin Ports
man in the completion function.

~Matt


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

end of thread, other threads:[~2007-10-18 23:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-12 23:19 man completion Mildred
2007-10-13 12:06 ` arno
2007-10-18 22:21   ` Mildred
2007-10-18 23:23     ` Matthew Wozniski

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