[ANN] argparse 0.7.0

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] argparse 0.7.0

Daurnimator
Hi all,

I'm happy to announce the release of argparse 0.7.0.
Argparse is a feature-rich command line parser for Lua; it supports
positional arguments, options, flags, optional arguments, subcommands
and more.
The project was created and maintained by Peter Melnichenko who sadly
is no longer with us
(http://lua-users.org/lists/lua-l/2018-11/msg00114.html). The luarocks
organisation has taken over maintainership of the argparse project,
which is now hosted at https://github.com/luarocks/argparse/
This year as part of the Google Summer of Code, Paul Ouellettee added
a new feature to generate of command line completion scripts, which
allows any program that uses argparse to get tab completions in bash,
zsh and fish.

Major changes:

  - Added support for generating shell completion scripts for Bash,
Zsh, and Fish using the Parser methods `:get_bash_complete()`,
`:get_zsh_complete()`, and `:get_fish_complete()`. The Parser methods
`:add_complete()` and `:add_complete_command()` add a `--completion`
option or `completion` command to the parser.
  - Added `:add_help_command()` method to Parser and Command objects.
The help command shows help for the specified subcommand.
  - Added `choices` option and argument property for specifying a set
of acceptable values for the argument.
  - Added `summary` command property for specifying the description
shown in the parent parser's help message.
  - The location of the help flag in usage and help messages is now
determined by when it is added to the parser, rather than always being
the last option. By default it is now the first option.

Note that the documentation at https://argparse.readthedocs.io/ will
not be updated for a few weeks, as we're awaiting permissions to
publish there.

Regards,
Daurnimator

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] argparse 0.7.0

Pierre Chapuis
As a user of argparse, it is fantastic to see that its maintenance has
been picked up so well. Thank you all!

--
Pierre Chapuis

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] argparse 0.7.0

Lorenzo Donati-3
In reply to this post by Daurnimator
On 16/08/2019 04:12, Daurnimator wrote:

> Hi all,
>
> I'm happy to announce the release of argparse 0.7.0.
> Argparse is a feature-rich command line parser for Lua; it supports
> positional arguments, options, flags, optional arguments, subcommands
> and more.
> The project was created and maintained by Peter Melnichenko who sadly
> is no longer with us
> (http://lua-users.org/lists/lua-l/2018-11/msg00114.html). The luarocks
> organisation has taken over maintainership of the argparse project,
> which is now hosted at https://github.com/luarocks/argparse/
> This year as part of the Google Summer of Code, Paul Ouellettee added
> a new feature to generate of command line completion scripts, which
> allows any program that uses argparse to get tab completions in bash,
> zsh and fish.
>
> Major changes:
>
>   - Added support for generating shell completion scripts for Bash,
> Zsh, and Fish using the Parser methods `:get_bash_complete()`,
> `:get_zsh_complete()`, and `:get_fish_complete()`. The Parser methods
> `:add_complete()` and `:add_complete_command()` add a `--completion`
> option or `completion` command to the parser.
>   - Added `:add_help_command()` method to Parser and Command objects.
> The help command shows help for the specified subcommand.
>   - Added `choices` option and argument property for specifying a set
> of acceptable values for the argument.
>   - Added `summary` command property for specifying the description
> shown in the parent parser's help message.
>   - The location of the help flag in usage and help messages is now
> determined by when it is added to the parser, rather than always being
> the last option. By default it is now the first option.
>
> Note that the documentation at https://argparse.readthedocs.io/ will
> not be updated for a few weeks, as we're awaiting permissions to
> publish there.
>
> Regards,
> Daurnimator
>
>
Kudos!

A question: does it work also on Windows? Since you mentioned support
for Linuxy stuff (Bash, etc.) hence the doubt.

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] argparse 0.7.0

Hisham
On Sun, 25 Aug 2019 at 09:33, Lorenzo Donati <[hidden email]> wrote:
> A question: does it work also on Windows? Since you mentioned support
> for Linuxy stuff (Bash, etc.) hence the doubt.

argparse is now used by LuaRocks, which does run on Windows, so the
answer is yes. :)

-- Hisham

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] argparse 0.7.0

Lorenzo Donati-3
On 28/08/2019 22:23, Hisham wrote:

> On Sun, 25 Aug 2019 at 09:33, Lorenzo Donati <[hidden email]> wrote:
>> A question: does it work also on Windows? Since you mentioned support
>> for Linuxy stuff (Bash, etc.) hence the doubt.
>
> argparse is now used by LuaRocks, which does run on Windows, so the
> answer is yes. :)
>
> -- Hisham
>
>
Thanks for confirming this, Hisham!