summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-05-03 22:52:51 -0400
committerJune McEnroe <june@causal.agency>2021-05-03 22:52:51 -0400
commit3c2fb80184123d9de07e0a863de31014c80ce830 (patch)
treed4e9fc8f8b7c3228fda3b8ce1d0db3b6acd03330
parentAdd ff alias (diff)
downloadsrc-3c2fb80184123d9de07e0a863de31014c80ce830.tar.gz
src-3c2fb80184123d9de07e0a863de31014c80ce830.zip
Emulate MANSECT for mandoc which lacks it
-rw-r--r--home/.shrc9
1 files changed, 9 insertions, 0 deletions
diff --git a/home/.shrc b/home/.shrc
index 2c996cfe..4b0e6c61 100644
--- a/home/.shrc
+++ b/home/.shrc
@@ -18,6 +18,15 @@ alias rand='openssl rand -base64 33'
 alias private='eval "$(gpg -d ~/.private)"'
 type doas >/dev/null && alias sudo=doas
 
+man() {
+	test $# -ne 1 && { command man "$@"; return $?; }
+	(IFS=:
+	for sect in $MANSECT; do
+		command man -w $sect "$1" >/dev/null 2>&1 && exec man $sect "$1"
+	done
+	exec man "$1")
+}
+
 cd() {
 	local path
 	if [ $# -eq 0 ]; then
3-05-22 12:53:06 +0200'>2013-05-22shared.c: use die_errno() where appropriateJohn Keeping 2013-05-22html.c: die when write failsJohn Keeping 2013-05-22ui-log: add <span/> around commit decorationsJohn Keeping 2013-05-22Makefile: fix parallel "make test"John Keeping 2013-05-18cache.c: fix cache_lsJohn Keeping 2013-05-13t0109: "function" is a bash-ismJohn Keeping 2013-05-13New mailing list.Jason A. Donenfeld 2013-04-30ui-snapshot: do not access $HOMEJason A. Donenfeld 2013-04-27t0001: validate Git -rcN version numbers correctlyJohn Keeping 2013-04-27git: update to 1.8.2.2John Keeping 2013-04-17scan-tree: fix regression in section-from-path=-1John Keeping 2013-04-15t0001: ignore ".dirty" suffix on Git versionJohn Keeping 2013-04-15tests: set TEST_OUTPUT_DIRECTORY to the CGit test directoryJohn Keeping 2013-04-15t0109: test more URLsJohn Keeping 2013-04-10cgitrc.5.txt: Specify when scan-path must be defined before.Jason A. Donenfeld 2013-04-10ui-snapshot.c: Prepend "V" when guessing ref namesLukas Fleischer 2013-04-10t0107: Skip ZIP tests if unzip(1) isn't availableLukas Fleischer 2013-04-10tests/: Do not use `sed -i`Lukas Fleischer 2013-04-10Add branch-sort and repo.branch-sort options.Jason A. Donenfeld 2013-04-10t0109: chain operations with &&John Keeping 2013-04-10cgit.c: Do not restore unset environment variablesLukas Fleischer 2013-04-09t0107: Use `tar -z` for gzip'ed archivesLukas Fleischer