bin/hey: fallback to hey-X binary

Allows for extensions.
This commit is contained in:
Henrik Lissner 2021-01-24 13:06:03 -05:00
parent 4a57fc7d2a
commit 24a93a756b

View file

@ -217,8 +217,12 @@ function main {
h|help) _usage ;;
-*) _do nix-env "$cmd" "$@" ;;
"") _usage ;;
*) echo "Couldn't find command: $cmd" 1>&2
exit 1
*) if command -v hey-$cmd >/dev/null; then
hey-$cmd $@
else
echo "Couldn't find command: $cmd" 1>&2
exit 1
fi
;;
esac
}