It would be nice if the short and long options for arguments could take atoms, or at least throw errors if they won't. I had this configuration:
#{
arguments => [
#{name => backgrounds, short => b, long => backgrounds, type => binary, default => "0..8"}
]
}
Calling the escript CLI gave this output:
$ ./tool
usage: colortool
$ ./tool -b foo
error: tool: unrecognised argument: -b
usage: tool
Of course, it works if I change it to $b. This one took a long time to debug 😄
If they should take atoms, I think short should only take one letter atoms and error out otherwise, and long should take any string atom and automatically prepend it with "-" so that the default flag format is --flag (since most UNIX CLIs follow that).
It would be nice if the
shortandlongoptions for arguments could take atoms, or at least throw errors if they won't. I had this configuration:#{ arguments => [ #{name => backgrounds, short => b, long => backgrounds, type => binary, default => "0..8"} ] }Calling the escript CLI gave this output:
Of course, it works if I change it to
$b. This one took a long time to debug 😄If they should take atoms, I think
shortshould only take one letter atoms and error out otherwise, andlongshould take any string atom and automatically prepend it with"-"so that the default flag format is--flag(since most UNIX CLIs follow that).