This file contains 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
# Manual opt parsing example | |
# | |
# Features: | |
# - supports short and long flags (ie: -v|--verbose) | |
# - supports short and long key/value options (ie: -f <file> | --filename <file>) | |
# - supports short and long key/value options with equals assignment (ie: -f=<file> | --filename=<file>) | |
# - does NOT support short option chaining (ie: -vh) | |
# - everything after -- is positional even if it looks like an option (ie: -f) | |
# - once we hit an arg that isn't an option flag, everything after that is considered positional | |
function optparsing_demo() { |