Blob Blame History Raw
# shellcheck shell=sh
# Initialization script for bash, sh, mksh and ksh

_declare="declare -f"
_opt="-f"

if [ "$0" = "ksh" ] || [ "$0" = "-ksh" ] || [ "$0" = "mksh" ] || [ "$0" = "-mksh" ] ; then
  _declare="typeset -f"
  _opt=""
fi
 
which ()
{
(alias; eval ${_declare}) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot "$@"
}

export ${_opt} which