mirror of
https://github.com/clearlinux/ok.sh.git
synced 2026-08-25 08:35:59 +00:00
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:
+7
-5
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user