jazzdotdev / jazz

The Scripting Engine that Combines Speed, Safety, and Simplicity
Apache License 2.0
146 stars 11 forks source link

clap-like cli.scl command line args and help generator library for apps #168

Open naturallymitchell opened 5 years ago

naturallymitchell commented 5 years ago

https://docs.rs/clap/2.32.0/clap/

https://stackoverflow.com/questions/9725675/is-there-a-standard-format-for-command-line-shell-help-text

https://github.com/mpeterv/argparse https://github.com/docopt/docopt.lua https://github.com/chef/mixlib-cli

https://www.reddit.com/r/lua/comments/ommzuu/lua_for_shell_scripting/

naturallymitchell commented 5 years ago

argparse is a whole parser. it makes more sense to use clap bindings for parsing this type of input in Rust

naturallymitchell commented 5 years ago

I think we mainly need this issue https://docs.rs/clap/2.32.0/clap/struct.App.html#method.get_matches_safe

naturallymitchell commented 5 years ago

afaict, we need clap.from_yaml(), clap.get_matches_safe(), usage and help. anything else? and would it work?

naturallymitchell commented 5 years ago

question of would it work, how do we pass the get_matches_safe() to lua?

juchiast commented 5 years ago

How will you use the result of get_matches_safe() in lua?

naturallymitchell commented 5 years ago

https://github.com/foundpatterns/torchbear-libs/issues/1