On Mon, Feb 06, 2023 at 08:38:47PM +0530, Subhaditya Nath wrote: > Putting a colon at the beginning of optstring to silence errors doesn't > mean that the colon is a valid option. Before this patch, dash treated > -: as a valid option if the optstring started with a colon. This patch > fixes that problem. > > Test: > > getopts :a opt -: > echo $opt$OPTARG > > Correct output - ?: > Invalid output - : > --- > src/options.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Patch applied. Thanks. -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt