fixed displayed value
This commit is contained in:
@@ -285,8 +285,9 @@ conf_dump()
|
||||
|
||||
# Commented-out key=value — shown only with show_all.
|
||||
# The value displayed is the live environment value (what load_conf
|
||||
# actually exported), not the commented-out text which may be an
|
||||
# example or stale documentation. Each key is shown at most once.
|
||||
# actually exported); when the key is not set in the environment we
|
||||
# fall back to the value written in the comment, i.e. the documented
|
||||
# default. Each key is shown at most once.
|
||||
if (show_all && $0 ~ /^[[:space:]]*#[[:space:]]*[A-Za-z_][A-Za-z0-9_]*[[:space:]]*=/) {
|
||||
line = $0; sub(/^[[:space:]]*#[[:space:]]*/, "", line)
|
||||
key = line; sub(/[[:space:]]*=.*$/, "", key); sub(/^[[:space:]]*/, "", key)
|
||||
@@ -294,6 +295,7 @@ conf_dump()
|
||||
seen[current_sec ":" key] = 1
|
||||
if (key_filter != "" && index(key, key_filter) == 0) next
|
||||
val = ENVIRON[key]
|
||||
if (val == "") { val = line; sub(/^[^=]*=[[:space:]]*/, "", val) }
|
||||
if (!hdr_printed) {
|
||||
if (found) print ""
|
||||
print c_sec "[" current_sec "]" c_rst
|
||||
|
||||
Reference in New Issue
Block a user