flag_parser
Version, currently 0.1.13 versions
- 0.1.2latestOct 12, 2016
- 0.1.1not indexedApr 8, 2017
- 0.1.0not indexedApr 8, 2017
github.com/bew/flag_parser.cr
CLI flags parser
Nothing has been indexed for 0.1.1 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
flag_parser:
github: bew/flag_parser.cr
version: ~> 0.1.1Then run:
shards installshard.yml
No shard.yml has been indexed for 0.1.1. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
flag_parser
Yet another command line flag parser library :)
Installation
Add this to your application's shard.yml:
dependencies:
flag_parser:
github: Bew78LesellB/flag_parser.cr
Usage
require "flag_parser"
value = 0
args = %w(--option 42)
FlagParser.parse args do |parser|
parser.add_rule "VALUE", FlagParser::Rule::NUM
parser.on "-o VALUE", "--option VALUE", doc: "Set option value" do |(a_value)|
value = a_value.to_i
end
end
puts value # => 42
TODO: Write more usage instructions here
TODO
[ ] execution policy (1. parse all THEN exec handler, 2. or parse AND exec when possible) 1. will be hard (impossible ?) when a callback comsume arguments based on runtime state.. ? [ ] recursive options : options that are applied on subparsers [ ] Exceptions on missing or no match
Contributing
- Fork it ( https://github.com/Bew78LesellB/flag_parser.cr/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- Bew78LesellB Benoit de Chezelles - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.1- Tagged
- Apr 8, 2017
- Commit
4214079eec59- Indexed
- not yet
Dependents
No indexed shard depends on this one yet.
Repository
github.com/bew/flag_parser.cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 16, 2026
- Synced
- Aug 16, 2026
- Versions
- 3