Add check for function defined to delegation

This commit is contained in:
rwxrob 2021-12-14 17:53:22 -05:00
parent 0e70a1b471
commit 3d01d93246
No known key found for this signature in database
GPG Key ID: 1CCACEDD2F65578E
1 changed files with 2 additions and 1 deletions

3
cmd
View File

@ -553,7 +553,8 @@ done
if [[ -n "$1" ]]; then
declare CMD="$1"; shift
for c in "${COMMANDS[@]}"; do
if [[ $c == "$CMD" ]]; then
declare cmd=$(command -v "x.$c")
if [[ $c == "$CMD" && -n "$cmd" ]]; then
"x.$CMD" "$@"
exit $?
fi