bin/perldoc

Thu, 28 Oct 2021 21:46:26 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Thu, 28 Oct 2021 21:46:26 -0500
changeset 953
e033f9ce0d8c
parent 774
d6a54f86ab10
permissions
-rwxr-xr-x

Simplify ag/grep setup

#!/bin/sh
set -eu

if [ -t 1 ]; then
  export PERLDOC="-oterm ${PERLDOC:-}"
fi

if [ -x "$(command -v cpandoc)" ]; then
  exec cpandoc $*
fi

BIN="$(which -a perldoc | grep -v $0 | head -n 1)"
exec $BIN $*

mercurial