Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jansorg committed Oct 9, 2024
1 parent be86251 commit 68d4466
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions command/info_sub/variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,10 @@ function _Dbg_do_info_variables() {
(($? != 0)) && return

# Caveats:
# Bash >= 5.2: 'declare -p' properly escapes special characters within $'', e.g. $'\n\t'
# Bash < 5.2: 'declare -p' does not escape special characters within $'', but only 'declare' does
# "declare -p" outputs variables without values, but "declare" does not
#
# To work with all of Bash 5.x, we're collecting all variables and values from 'declare'.
# We're collecting all variables and values from 'declare'.
# Because a plain "declare" also prints functions we're only iterating until the first function definition was found.
#
# Then we run declare with the filter parameters (-p, -i, etc.) to retrieve the variables to output.
Expand Down

0 comments on commit 68d4466

Please sign in to comment.