Added modiciation from a parallel project

This commit is contained in:
Gal Szkolnik 2022-10-23 18:10:30 -04:00
parent e14d5f3566
commit 278be5a6c6
24 changed files with 492 additions and 143 deletions

View file

@ -1 +1,9 @@
alias which-command="whence "
function which-command() {
local ANSWER=$(whence -w "${@}") || return $?
ANSWER=${ANSWER##*: }
[[ $ANSWER == "function" ]] && printf "function " && whence -f "${@}" && return
[[ $ANSWER == "alias" ]] && {
alias "${@}"
}
whence "${@}"
}