From 24a93a756b562884aaca969fbce06bc76cde5ce5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 24 Jan 2021 13:06:03 -0500 Subject: [PATCH] bin/hey: fallback to hey-X binary Allows for extensions. --- bin/hey | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/hey b/bin/hey index 281c00eb..03c365f9 100755 --- a/bin/hey +++ b/bin/hey @@ -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 }