diff options
| author | Colin Watson <cjwatson@debian.org> | 2012-02-04 21:48:25 +0000 |
|---|---|---|
| committer | Colin Watson <cjwatson@debian.org> | 2012-02-04 21:48:25 +0000 |
| commit | e37bc92f352c97c61ef63de745e43574d27b1276 (patch) | |
| tree | 7cdc23cd79e73557e120ef6257f649be5d8e5e4d | |
| parent | ff4cfcdd4cb85c923b4fe7218fe85a3daba99813 (diff) | |
| download | man-db-e37bc92f352c97c61ef63de745e43574d27b1276.tar.gz | |
* src/man.c (options): Add --path as an alias for -w.
(main): Running 'man -w' (etc.) without a name now prints the
manpath, for compatibility with other man implementations.
* NEWS: Document this.
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | NEWS | 4 | ||||
| -rw-r--r-- | src/man.c | 8 |
3 files changed, 18 insertions, 1 deletions
@@ -1,3 +1,10 @@ +Sat Feb 4 21:44:47 GMT 2012 Colin Watson <cjwatson@debian.org> + + * src/man.c (options): Add --path as an alias for -w. + (main): Running 'man -w' (etc.) without a name now prints the + manpath, for compatibility with other man implementations. + * NEWS: Document this. + Thu Feb 2 18:05:16 GMT 2012 Colin Watson <cjwatson@debian.org> * include/comp_src.h.in (comp_list): Don't handle .lzma files using @@ -27,6 +27,10 @@ Major changes since man-db 2.6.0.2: o Add support for Lzip-compressed manual pages, thanks to Matias A. Fonzo. + o Running 'man -w' (with a new --path alias) without a name now + prints the manpath, for compatibility with other man + implementations. The vim viewdoc plugin makes use of this. + man-db 2.6.0.2 (13 April 2011) ============================== @@ -280,6 +280,7 @@ static struct argp_option options[] = { { "apropos", 'k', 0, 0, N_("equivalent to apropos") }, { "global-apropos", 'K', 0, 0, N_("search for text in all pages") }, { "where", 'w', 0, 0, N_("print physical location of man page(s)") }, + { "path", 0, 0, OPTION_ALIAS }, { "location", 0, 0, OPTION_ALIAS }, { "where-cat", 'W', 0, 0, N_("print physical location of cat file(s)") }, { "location-cat", 0, 0, OPTION_ALIAS }, @@ -1162,7 +1163,12 @@ int main (int argc, char *argv[]) localnow->tm_hour == 0 && localnow->tm_min == 30) fprintf (stderr, "gimme gimme gimme\n"); - gripe_no_name (NULL); + if (print_where) { + manp = get_manpath (""); + printf ("%s\n", manp); + exit (OK); + } else + gripe_no_name (NULL); } section_list = get_section_list (); |
