load adds a 'which' function if 'which' command is missing

master
David Kebler 2024-02-12 18:10:17 -08:00
parent 0b092adfda
commit b38417294f
1 changed files with 6 additions and 0 deletions

View File

@ -65,6 +65,12 @@ unset BASH_SHELL_LOADED
module_load shell-process-directory module_load shell-process-directory
if ! command -v which > /dev/null; then
echo missing "which" command install package
which () { command -v "$1"; }
fi
# if [[ $SSH_SESSION ]]; then # if [[ $SSH_SESSION ]]; then
# # ssh session only process base by default # # ssh session only process base by default
# # env | grep SSH # # env | grep SSH