Skip to content

Commit 8ebf273

Browse files
author
Damien Nadé
committed
argsparse_pgm: added detailed docstring.
__argsparse_parameters_description: added docstring
1 parent 4b49111 commit 8ebf273

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

argsparse.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,10 @@ set +o posix
294294
declare -A __argsparse_options_descriptions=()
295295

296296
## @brief The name of the program currently using argsparse.
297+
## @details Automatically set by argsparse at load time, it contains
298+
## the basename (path-less but with extension, if any) of the main
299+
## script. Used internally to print error messages and by
300+
## usage-related functions, but can be used by the loading script.
297301
## @hideinitializer
298302
declare -r argsparse_pgm=${0##*/}
299303

@@ -614,6 +618,13 @@ argsparse_usage_short() {
614618
printf -- "%s\n" "$current_line"
615619
}
616620

621+
## @var Array __argsparse_parameters_description
622+
## @private
623+
## @brief Internal use only.
624+
## @ingroup ArgsparseUsage
625+
# @details Used by argsparse_describe_parameters() to store
626+
# non-option positionnal parameters short descriptions and by
627+
# argsparse_usage_short() to print them to end-users.
617628
declare -a __argsparse_parameters_description
618629

619630
## @fn argsparse_describe_parameters()
@@ -1385,7 +1396,7 @@ argsparse_has_option_property() {
13851396
declare -A __argsparse_short_options=()
13861397

13871398
# @fn __argsparse_optstring_has_short()
1388-
# @brief Internal use.
1399+
# @brief Internal use only.
13891400
# @details Prints the short option string suitable for getopt command
13901401
# line.
13911402
# @param optstring an optstring

0 commit comments

Comments
 (0)