dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit ac578c815daa40dc879ab50de5fa7af5d9a5f8b0
parent 6b05bcf3dde6ebcaefcb3c12999b0f9e2af9ed2a
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Sat,  5 Oct 2019 12:47:55 +0200

Fix man9 in POSIX shells and add OpenBSD install of plan9port

Diffstat:
M.config/sh/commands | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/.config/sh/commands b/.config/sh/commands @@ -126,13 +126,17 @@ man9() { plan9mans="/usr/lib/plan9/man/man1" elif [ -d /opt/plan9 ]; then plan9mans="/opt/plan9/share/man/man1" + elif [ -d /usr/local/plan9 ]; then + plan9mans="/usr/local/plan9/man/man1" else (>&2 echo "no plan9 port installed") return 1 fi + m="$1" if [ $# -lt 1 ]; then - 1="$(cd "$plan9mans" && find -- * -type f | sed 's/\.1$//' | fzy)" + m="$(cd "$plan9mans" && find -- * -type f | sed 's/\.1$//' | fzy)" fi - f="$plan9mans/${1}.1" + f="$plan9mans/${m}.1" + echo "$f" [ -e "$f" ] && man "$f" }