Improvements
This commit is contained in:
parent
726463c3ab
commit
589b6fa2f4
9 changed files with 55 additions and 56 deletions
|
@ -1,9 +1 @@
|
|||
function which-command() {
|
||||
local ANSWER=$(whence -w "${@}") || return $?
|
||||
ANSWER=${ANSWER##*: }
|
||||
[[ $ANSWER == "function" ]] && printf "function " && whence -f "${@}" && return
|
||||
[[ $ANSWER == "alias" ]] && {
|
||||
alias "${@}"
|
||||
}
|
||||
whence "${@}"
|
||||
}
|
||||
alias which-command="whence "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue