~theorytoe/mman

ce062db8c3e05f334b80ec97e88651e54a9c652e — theorytoe 6 months ago 4992221
rm: -l option

The -k option with no arg does the exact same thing
no point in keeping a redundant option.

Plus its more similar to `man` anyway now
2 files changed, 5 insertions(+), 11 deletions(-)

M mman
M mman.1
M mman => mman +1 -5
@@ 137,13 137,12 @@ listpages() {

usage() {
	cat << EOF
usage: $(basename $0) [-e|-t|-s|-c|-l] [section] name
usage: $(basename $0) [-e|-t|-s|-c|-k] [section] name
    -e Edit a txt man page
    -t Edit a troff -man manpage
    -s Edit an scdoc manpage
    -c Compile scdoc manpages
    -k Search through pages
    -l List available pages
What mmanual do you want?
EOF
}


@@ 165,9 164,6 @@ while [ $# -gt 0 ]; do
			# love hacks
			compileman
			exit $?;;
		-l)
			listpages
			exit $?;;
		-k)
			shift
			listpages | grep "$1" || echo "Page(s) not found with query \"$1\"."

M mman.1 => mman.1 +4 -6
@@ 5,7 5,7 @@ mman \- write personal mmanpages

.SH SYNPOSYS
.B mman
.RB [ \-l | \-c ]
.RB [ \-c ]
.RB [ \-k
.IR query ]
.PP


@@ 63,11 63,9 @@ Compile scdoc manpages.

.TP
.B \-k
Search for \fIquery\fR in list of known mman pages.

.TP
.B \-l
List available pages.
.RI [ query ]
.IP
Search for \fIquery\fR in list of known mman pages. Empty query returns all pages.

.SH NOTES
Be wary of pages written with scdoc. If a troff and scdoc page are named the same, compiling