}
# Extract argument name
- if (work ~ /^\[=[^\] \t]+\]/) {
+ if (work ~ /^\[=[^ \t]+\]/ && sub(/\]/, "&", work) == 1) {
if (n = index(work, "]")) {
arg = substr(work, 3, n-3)
work = substr(work, n+1)
sub(/^[ \t]*/, "")
if (!$0) { next }
- optionhelp[lopt] = (lopt in optionhelp ? optionhelp[lopt] "\n" : "") $0
+ if (lopt in optionhelp)
+ $0 = "\n" $0;
+ optionhelp[lopt] = optionhelp[lopt] $0;
}
# Exit immediately on error