= perl6-getopt-advance :toc-title: contents :description: An advance command line parse tool replace Getopt::Kinoko :keywords: getopt command line option :Email: blackcatoverwall@gmail.com :Revision: 1.0 :icons: font :source-highlighter: pygments :source-language: perl6 :pygments-linenums-mode: table :toc: left :lang: en image:https://travis-ci.org/araraloren/perl6-getopt-advance.svg?branch=master["Build Status", link="https://travis-ci.org/araraloren/perl6-getopt-advance"] image:https://ci.appveyor.com/api/projects/status/1aknogb99475ak53/branch/master?svg=true["Windows Build Status", link="https://ci.appveyor.com/api/projects/status/1aknogb99475ak53?svg=true"] An advance command line parse tool replace Getopt::Kinoko = Description `Getopt::Advance` is a powerful command line option parsing module, it suppot many style such as: `unix-style`、`gnu-style`、`bsd-style`.etc. It support `Hash`、`Array` option compared to traditional command line tools. In addition, it also support `radio`、`multi` group mechanism which can manage option realtionship. And to handle non-option argument, it provide `main`、`pos` and `cmd` feature. = Usage == Try it === Normal version [source,perl6] --------------- use Getopt::Advance; my OptionSet $os .= new(); $os.push( "h|help=b", "print help message.", callback => sub ($, $) { say "The h option is set by user"; }); &getopt($os); say "Exit!"; --------------- === With react [source,perl6] --------------- use Getopt::Advance; my OptionSet $os .= new(); $os.push("h|help=b", "print help message."); react { whenever $os.Supply("h") { say "The h option is set by user"; } whenever &getopt($os) { say "Exit!"; done; } } --------------- == Document link:doc/Getopt/Advance.adoc[Getopt-Advance] == Example === App::snippet link:https://github.com/araraloren/perl6-app-snippet[Run your c/c++ code.] === App::FindSource link:https://github.com/araraloren/perl6-app-findsource[Find your source file easily!] === xcp A link:sample/xcp.p6[script] display the copy progress. === pdnf link:sample/pdnf.p6[pdnf] added some sort command to dnf(package manager of some linux distribution). === find-file link:sample/find-file.p6[find-file] ==== usage .help [source,shell] ----------------------- $ ./find-file.p6 Usage: ./sample/find-file.p6 [directory] OPTIONs -d specify file type to directory -v|--version print program version. --size= the minimum size limit of file. -? same as -h. -h|--help print this help. -f specify file type to normal file -l specify file type to symlink ----------------------- .find [source,shell] ---------------------- $ ./find-file.p6 ../t '1\d.*t$' ../t/11-bsd-style.t ../t/10-x-style.t ---------------------- = Installation * install with zef zef install Getopt::Advance = Lincese The MIT License (MIT). = TODO * Update documents * Update subs feature