Update _helptext to surround argument defaults with backtics

This will improve the Markdown rendering and is hopefully still obvious
at the CLI.
This commit is contained in:
Seth House
2015-04-08 02:22:29 -06:00
parent 2b3011135a
commit e7abe40951
+7 -5
View File
@@ -272,11 +272,13 @@ _helptext() {
print line
}
/^\s*local/ {
sub(/^\s*local /, "* ")
sub(/:.*$/, "")
sub(/=/, " : ")
sub(/\${/, "$")
print
sub(/^\s*local /, "")
idx = index($0, "=")
name = substr($0, 1, idx - 1)
val = substr($0, idx + 1)
sub(/\${/, "$", val)
sub(/:.*$/, "", val)
print "* " name " : `" val "`"
}
!NF { exit }' "$name"
}