Improvements
This commit is contained in:
parent
d8e37c1fdf
commit
d6a9f59544
6 changed files with 48 additions and 12 deletions
|
@ -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 "${@}"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue