On 4/25/17 10:10 AM, scra...@gmail.com wrote: > Bash Version: 4.3 > Patch Level: 46 > Release Status: release > > Description: > When using any functionality that triggers shquote the > comma character is escaped with a backslash which bash > doesn't strip when the quoted text is reused, while > tilde isn't despite it causing home directory expansion.
The documentation states "reused as shell input", which isn't quite the same as the output of a word expansion. The backslash quoting the comma, which serves to inhibit brace expansion, is removed just fine if the string is used as shell input. As for the tilde: $ echo $(printf "%q\n" "~" "a,b") \~ a\,b $ eval echo $(printf "%q\n" "~" "a,b") ~ a,b $ echo $BASH_VERSION 4.3.48(30)-release The same explanation suffices for why the tilde is quoted with a backslash. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/