diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-07-11 21:56:06 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-07-11 21:56:06 +0000 |
commit | c4610275cad3c1faa5e67e9c6b60f87914c75c0f (patch) | |
tree | 078fc606957f63826e0b92f1e9e4de67f3e6023b /makewhatis.1 | |
parent | 279a091e7bf9c2b175b0d3235526aa8e458b7391 (diff) | |
download | mandoc-c4610275cad3c1faa5e67e9c6b60f87914c75c0f.tar.gz mandoc-c4610275cad3c1faa5e67e9c6b60f87914c75c0f.tar.zst mandoc-c4610275cad3c1faa5e67e9c6b60f87914c75c0f.zip |
Fairly straightforward patch adding basic update (-u) and remove (-r)
functionality to makewhatis. This is somewhat expensive (requiring the
index file to be trawled multiple times), but it's a good start.
Diffstat (limited to 'makewhatis.1')
-rw-r--r-- | makewhatis.1 | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/makewhatis.1 b/makewhatis.1 index aa0cf5b4..6e9ae879 100644 --- a/makewhatis.1 +++ b/makewhatis.1 @@ -1,4 +1,4 @@ -.\" $Id: makewhatis.1,v 1.12 2011/07/11 09:44:07 kristaps Exp $ +.\" $Id: makewhatis.1,v 1.13 2011/07/11 21:56:06 kristaps Exp $ .\" .\" Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv> .\" @@ -22,7 +22,7 @@ .Nd index UNIX manuals .Sh SYNOPSIS .Nm -.Op Fl v +.Op Fl ruv .Op Fl d Ar dir .Ar .Sh DESCRIPTION @@ -42,6 +42,15 @@ or .Xr man 7 .Ux manual format. +.It Fl r +Remove entries. +This will remove the index and keyword references. +If the record is not found, it is ignored. +.It Fl u +Update the record. +This will first remove the record (as in +.Fl r ) +then re-add it. .It Fl v Verbose output. If specified once, prints the name of each indexed file. @@ -50,11 +59,12 @@ If twice, prints keywords for each file. .Pp By default, .Nm -constructs the +constructs a new .Sx Index Database and .Sx Keyword Database in the current working directory. +Existing databases are truncated. .Pp If fatal parse errors are encountered, the offending file is printed to stderr, omitted from the index, and the parse continues with the next @@ -133,6 +143,14 @@ The .Nm utility is .Ud +.Sh IMPLEMENTATION NOTES +The time to construct a new database pair grows linearly with the +number of keywords in the input. +However, removing or updating entries with +.Fl r +or +.Fl u , +respectively, grows as a multiple of the index length and input size. .Sh FILES .Bl -tag -width Ds .It Pa mandoc.db |