about summary refs log tree commit diff
path: root/exman.sh
blob: 5077c345e540cfc20607e76e197d18c2fd8332d3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
set -eu

die() {
	echo "$@" >&2
	exit 1
}

script=$0
path=${script%/*}
prefix=${path%/bin}
exman="${prefix}/share/exman"
[ -d "${exman}" ] || exman=$prefix

system=${1:-}
[ -n "${system}" ] || die 'What system do you want?'
shift

export MANPATH="${exman}/${system}"
[ -d "${MANPATH}" ] || die "No manuals for ${system}"

export MANSECT
for sect in "${MANPATH}"/man*/; do
	sect=${sect%/}
	sect=${sect##*/man}
	MANSECT="${MANSECT:-}${MANSECT:+:}${sect}"
done

exec man "$@"
more organizationJune McEnroe 2019-07-27Reference png.h in bin.7June McEnroe 2019-07-27Revert "Use scheme to style HTMLs"June McEnroe This reverts commit 46237a457ff3c9a813a56f2a442c115bf8610cbc. I don't know why but I don't like it. 2019-07-27Remove scheme text linkJune McEnroe No standard base64 encoder so no way to maintain it. 2019-07-26Update Dark.terminalJune McEnroe Why are the blobs so much bigger now? 2019-07-26Lighten dark whiteJune McEnroe 2019-07-25Add png.3 man pageJune McEnroe 2019-07-25Use scheme to style HTMLsJune McEnroe 2019-07-25Don't match comments in strings in makeJune McEnroe 2019-07-25Generate index.html with links from bin.7June McEnroe 2019-07-24Warn when date has changedJune McEnroe 2019-07-24Add whenJune McEnroe When? Now. 2019-07-24Remove histedit from bitJune McEnroe