Loading arg_parse_functions +9 −9 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ # hyphens converted to underscores. If not given or a null string it defaults # to $2 # $4 # The default value if the argument does not apear on the command line (only # The default value if the argument does not appear on the command line (only # for VALUE types) # $5 # The name to use as a placeholder for values in help messages. It defaults Loading Loading @@ -78,7 +78,7 @@ add_arg () # Add an alias to a previously defined argument. # # This is typically used to define both long and short versions of an argument, # or to define a depricated argument name. # or to define a deprecated argument name. # # Usage: # add_arg_alias <argument> <alias> Loading Loading @@ -115,7 +115,7 @@ add_arg_alias () # # Parameters: # $1 # The valiable to store the value in. # The variable to store the value in. # $2 # Whether the argument is required. Either "yes" or "no" # $3 Loading Loading @@ -161,13 +161,13 @@ next_opt () ## # sumarise_args() # summarise_args() # Print a single summary line of the arguments defined. # # Usage: # sumarise_args # summarise_args ## sumarise_args () summarise_args () { local ignore_long_flag short_flags long_flags values local arg dest metavar argtype default names required Loading Loading @@ -226,7 +226,7 @@ parse_args () case "$1" in --help|-h) printf "$BIN $command" sumarise_args | wrap " " summarise_args | wrap " " return 1 ;; --summary) Loading @@ -252,8 +252,8 @@ parse_args () ## # free_args() # Free all defined arguments so that the don't intefer with future argument # definintions (for instance if multiple subcommands are parsing their # Free all defined arguments so that the don't interfere with future argument # definitions (for instance if multiple subcommands are parsing their # arguments). # # Usage: Loading Loading
arg_parse_functions +9 −9 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ # hyphens converted to underscores. If not given or a null string it defaults # to $2 # $4 # The default value if the argument does not apear on the command line (only # The default value if the argument does not appear on the command line (only # for VALUE types) # $5 # The name to use as a placeholder for values in help messages. It defaults Loading Loading @@ -78,7 +78,7 @@ add_arg () # Add an alias to a previously defined argument. # # This is typically used to define both long and short versions of an argument, # or to define a depricated argument name. # or to define a deprecated argument name. # # Usage: # add_arg_alias <argument> <alias> Loading Loading @@ -115,7 +115,7 @@ add_arg_alias () # # Parameters: # $1 # The valiable to store the value in. # The variable to store the value in. # $2 # Whether the argument is required. Either "yes" or "no" # $3 Loading Loading @@ -161,13 +161,13 @@ next_opt () ## # sumarise_args() # summarise_args() # Print a single summary line of the arguments defined. # # Usage: # sumarise_args # summarise_args ## sumarise_args () summarise_args () { local ignore_long_flag short_flags long_flags values local arg dest metavar argtype default names required Loading Loading @@ -226,7 +226,7 @@ parse_args () case "$1" in --help|-h) printf "$BIN $command" sumarise_args | wrap " " summarise_args | wrap " " return 1 ;; --summary) Loading @@ -252,8 +252,8 @@ parse_args () ## # free_args() # Free all defined arguments so that the don't intefer with future argument # definintions (for instance if multiple subcommands are parsing their # Free all defined arguments so that the don't interfere with future argument # definitions (for instance if multiple subcommands are parsing their # arguments). # # Usage: Loading