From ebd6c644b517e3d0f8e3767984384ab0606af594 Mon Sep 17 00:00:00 2001 From: Jan Baier Date: Thu, 4 Apr 2024 18:34:24 +0200 Subject: [PATCH] Stop mixing option and non-option parameters Assume all options after first non-option arguments are options for the main command. With this, usages like `retry zypper -h` will interpret options correctly as `retry -- zypper -h` --- retry | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retry b/retry index 9071ecc..10c2c0e 100755 --- a/retry +++ b/retry @@ -17,7 +17,7 @@ options: # parse arguments opts=$(getopt \ - --options h,r:,s:,e:: \ + --options +h,r:,s:,e:: \ --longoptions help,retries:,sleep:,exponential:: \ --name "$(basename "$0")" -- "$@") || usage 1