You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe I missed it but is it possible to define positional required arguments?
Let's say I wanted to make the cp command in the format
cp [options] src dst
Is it possible to get optionator to fail if there are not exactly 2 positional arguments? And is it possible to get the first one added as src and the 2nd as dst.
I find I create lots of commands like this and I end up with lots of boilerplate like
Maybe I missed it but is it possible to define positional required arguments?
Let's say I wanted to make the
cp
command in the formatIs it possible to get optionator to fail if there are not exactly 2 positional arguments? And is it possible to get the first one added as
src
and the 2nd asdst
.I find I create lots of commands like this and I end up with lots of boilerplate like
that just seems like something optionator could handle saving me all the work. Does it already do that and I'm just missing it?
What I'd like to write is
where
positional: true
means it comes from positional arguments and based on the order in the optins array one comes before the other. Then'd use itAnd it would fail if src and dst were not provided
The text was updated successfully, but these errors were encountered: