The ‘global_options()’ function is a simple convenience call to include flags that can be used inside most ‘cpt’ tools. It defines the following flags:
Flag | Long Option | Calls |
---|---|---|
-f | --force | ‘CPT_FORCE’ |
-y | --no-prompt | ‘CPT_PROMPT’ |
--root | ‘CPT_ROOT’ | |
-h | --help | ‘usage()’ |
-v | --version | ‘version()’ |
--verbose | ‘CPT_VERBOSE’ |
This function can take two arguments:
If this argument is specified, the function does not print the usage information defined by its flags.
If this argument is specified, the function only prints the help
output of the --help
and --version
flags.