On Mon, Oct 30, 2017 at 10:34:47AM +0800, Clark Wang wrote: > See following example: > > [STEP 100] # echo $BASH_VERSION > 4.4.12(2)-release > [STEP 101] # v=\'\' > [STEP 102] # printf '%q\n' "$v" > \'\' > [STEP 103] # printf '%s\n' "${v@Q}" > ''\'''\''' > [STEP 104] #
What's the bug? They are equivalent. If you mean "I would like bash to perform a second optimization pass over the result of ${var@Q} so that it's prettier in my degenerate edge cases", I suspect there are better uses of Chet's time, but it's his call.