murex icon indicating copy to clipboard operation
murex copied to clipboard

Parameter-based builtins should warn when too many parameters are submitted

Open lmorg opened this issue 5 years ago • 0 comments

murex has a library for handing flags in functions and builtins (eg command --flag value) but very little tooling around sequential parameters (eg command parameter1 parameter2) beyond checking for specific values.

This isn't a bug but it can affect usability. Just the other day I typed in

open cloudtrail-logs.json [0] -> pretty -> less

and wondered why I didn't get the first index; before realising much later that I was missing a pipe:

open cloudtrail-logs.json -> [0] -> pretty -> less

Had open told me off for entering too many parameters, my mistake would have been immediately obvious.

lmorg avatar Sep 11 '19 19:09 lmorg