HEX
Server: Apache
System: Linux srv106.o-net.co.il 4.18.0-553.74.1.lve.el8.x86_64 #1 SMP Tue Sep 9 14:25:24 UTC 2025 x86_64
User: neomare (1071)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: //etc/profile.d/which2.sh
# shellcheck shell=sh
# Initialization script for bash, sh, mksh and ksh


if [ -r /proc/$$/exe ]; then
    SHELLNAME=$(basename $(readlink /proc/$$/exe))
else
    SHELLNAME="unknown"
fi

case "$SHELLNAME" in
*ksh*)
    which_declare=""
    which_opt=""
    ;;
zsh)
    which_declare="typeset -f"
    which_opt=""
    ;;
bash|sh)
    which_declare="declare -f"
    which_opt="-f"
    ;;
*)
    which_declare=""
    which_opt=""
    ;;
esac

function which {
    (alias; eval ${which_declare}) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot $@
}

export which_declare
export ${which_opt} which