Closed ghost closed 9 years ago
I never thought of doing that, but it would be handy.
In the meantime, you can use a string, or ruby's extended symbol syntax:
switch :'dry-run'
# or
switch "dry-run"
GLI should make both the string and symbol version available in the options
or global_options
hash:
unless options["dry-run"]
# rm -rf
end
Hey, that works. Thanks a lot. ps: great book you wrote (Building awesome command line applications with ruby 2)
Thanks, and thanks for buying!
I want to have a switch called --dry-run. With thor I can add it as :dry_run and thor will convert the underscore to hyphen. How can I achieve the same with GLI ?