Last active
August 29, 2015 14:11
-
-
Save RyanScottLewis/915a4192e3c2c4729447 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RyBookPro:Desktop ryguy$ ./slop_iterm_example | |
| {:terminal=>"iTerm", :help=>nil} | |
| RyBookPro:Desktop ryguy$ ./slop_iterm_example --help | |
| Usage: slop_iterm_example [options] | |
| -t, --terminal Terminal to use. (default: iTerm) | |
| -h, --help Display this help message. | |
| RyBookPro:Desktop ryguy$ ./slop_iterm_example --terminal=MyTerm | |
| {:terminal=>"MyTerm", :help=>nil} | |
| RyBookPro:Desktop ryguy$ ./slop_iterm_example --terminal MyTerm | |
| {:terminal=>"MyTerm", :help=>nil} | |
| RyBookPro:Desktop ryguy$ ./slop_iterm_example -t MyTerm | |
| {:terminal=>"MyTerm", :help=>nil} | |
| RyBookPro:Desktop ryguy$ ./slop_iterm_example -t=MyTerm | |
| {:terminal=>"MyTerm", :help=>nil} | |
| RyBookPro:Desktop ryguy$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require 'slop' | |
| options = Slop.parse( help: true ) do | |
| on :t, :terminal=, 'Terminal to use.', default: 'iTerm' | |
| end | |
| p options.to_hash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment