Open taktoa opened 8 years ago
It's also worth noting that you could probably get a lot of this functionality for free by switching to a proper argument parsing library. I'm partial to docopt
, but optparse-applicative
and cmdargs
are supposed to be pretty good as well (some of them allow for automatic generation of bash completion scripts, which is always nice).
I can't decide if docopt
sounds great or scary. 😄 Using optparse-applicative
and cmdargs
might be a bit kinder to distro packagers in any case: Debian and Fedora both package both of those, but neither packages the Haskell version of docopt
.
I'm don't have time to work on this at the moment, but a patch would be very welcome!
I noticed that you generate a man page for
bustle-pcap
withhelp2man
. It seems like it would be better if we could havebustle
output its help in a way that also allows use ofhelp2man
(even if it's too painful to get the build system to run it, some distributions, like NixOS, can make use of this). As it stands, there are two problems:--version
flag onbustle
. This should be quite helpful for implementing that in a maintainable way.--help
output is not quite right.Here's a
bash
script that has fairly appealing behavior when run underhelp2man
: