Kalle Olavi Niemitalo <[EMAIL PROTECTED]> writes: > - Automatically detect whether and how the string has been > quoted, and adapt. This detection cannot be based solely on > whether the system is Debian, because the user's ~/.mailcap > may contain entries that are quoted differently. Also, if > the % is nested deeply inside backquotes and such, it may > not be obvious what should happen. In such cases, it would > be best to give an error message.
It is also possible to construct shell commands where parsing the quotes correctly requires recognizing "case" statements. echo "$(case "$EDITOR" in emacs) echo "%s'" ;; esac)" \' If the parser thinks the $() ends at the first closing parenthesis, it will seem that the %s is not quoted at all. In reality though, %s is inside "" inside $() inside "", and metacharacters should be escaped as if inside only "". Bash 3.1.17 doesn't get this right (Debian bug 86397); dash 0.5.3 does. Which perhaps implies that people are unlikely to actually use such constructs in mailcap files. This may eventually get fixed in Bash, however.
pgpyNuaAaLzgq.pgp
Description: PGP signature
_______________________________________________ elinks-dev mailing list [email protected] http://linuxfromscratch.org/mailman/listinfo/elinks-dev
