Package: man-db
Version: 2.5.6-5
Severity: wishlist
Tags: patch

Hello!

On Mon Jul 13 13:40:17 BST 2009, upstream implemented a subpage lookup, that
is, the ability to display pages such git-add(1) when called “man git add”.

This is very useful for software suites composed of commands with several
sub-commands, such as git. However, some software suites use a different syntax
for their man pages, for instance lh_binary(1).

Here is a patch to look for underscore-separated subpages, in addition to
dash-separated ones.

Regards,

-- 
Tanguy Ortolo

-- System Information:
Debian Release: 5.0.4
  APT prefers stable
  APT policy: (990, 'stable'), (60, 'testing'), (50, 'unstable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages man-db depends on:
ii  bsdmainutils           6.1.10            collection of more utilities from 
ii  debconf [debconf-2.0]  1.5.24            Debian configuration management sy
ii  dpkg                   1.15.5.6          Debian package management system
ii  groff-base             1.18.1.1-21       GNU troff text-formatting system (
ii  libc6                  2.10.2-6          Embedded GNU C Library: Shared lib
ii  libgdbm3               1.8.3-3           GNU dbm database routines (runtime
ii  zlib1g                 1:1.2.3.3.dfsg-12 compression library - runtime

man-db recommends no packages.

Versions of packages man-db suggests:
ii  epiphany-browser [www-b 2.29.3-1         Intuitive GNOME web browser
ii  groff                   1.18.1.1-21      GNU troff text-formatting system
ii  iceape-browser [www-bro 2.0.1-1          Iceape Navigator (Internet browser
ii  iceweasel [www-browser] 3.5.8-1~bpo50+2  Web browser based on Firefox
ii  kazehakase [www-browser 0.5.4-2.2+lenny1 GTK+-base web browser that allows 
ii  less                    418-1            Pager program similar to more
ii  links2 [www-browser]    2.1pre37-1.1     Web browser running in both graphi
ii  lynx-cur [www-browser]  2.8.7dev9-2.1    Text-mode WWW Browser with NLS sup
ii  midori [www-browser]    0.2.0-1          fast, lightweight graphical web br
ii  w3m [www-browser]       0.5.2-2+b1       WWW browsable pager with excellent

-- debconf information excluded
--- src/man.c.old	2010-03-19 17:58:58.232651713 +0100
+++ src/man.c	2010-03-19 18:03:13.803608939 +0100
@@ -1203,6 +1203,16 @@
 					++first_arg;
 				}
 			}
+			if (!found_subpage && subpages && first_arg < argc) {
+				char *subname = xasprintf (
+					"%s_%s", nextarg, argv[first_arg]);
+				status = man (subname, &found);
+				free (subname);
+				if (status == OK) {
+					found_subpage = 1;
+					++first_arg;
+				}
+			}
 			if (!found_subpage)
 				status = man (nextarg, &found);
 		}

Attachment: signature.asc
Description: Digital signature

Reply via email to