argparse-bash icon indicating copy to clipboard operation
argparse-bash copied to clipboard

Use python's argparse module in shell scripts

Results 5 argparse-bash issues
Sort by recently updated
recently updated
newest added

Added syntax highlighting so it's a bit easier to read @nhoffman Please take a look :)

This PR adds an epilog to the options (like ARGPARSE_DESCRIPTION is optional)

Since calling `python my_script.py --help` return an exit code of 0, shouldn't calling `bash my_script.sh --help` also return an exit code of 0. Currently, it is documented in the project...

When I run my bash script with the version argument, e.g. ```parser.add_argument('--version', action='version', version='%(prog)s 1.0.0')``` I get the following error: ```./argparse.bash: line 60: 0.1: command not found```

When using argparse() to parse arguments of a shell function, it printed "bash", instead of function name, in usage message. The change fixes it.