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
| # by Chris Collazo | |
| # Released to the public domain | |
| import std/parseopt | |
| # `short` is optional | |
| proc get_option*(oparser: var OptParser, name: string, default: string, short: string = ""): string = | |
| for kind, key, val in oparser.getopt(): | |
| if kind == cmdLongOption and key == name: | |
| return val |