Re: witekfl branch status

Kalle Olavi Niemitalo <[email protected]>
Newsgroups gmane.comp.web.links
Message-ID <[email protected]>
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.

_______________________________________________
elinks-dev mailing list
[email protected]
http://linuxfromscratch.org/mailman/listinfo/elinks-dev
signature.asc (application/pgp-signature, 188 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFF9PtVHm9IGt60eMgRAq2AAKCmJkAneHKBG1X3sNRPyLJjVWHKJQCgvXnL
14YFSfNYmKuZUz4ok1kYwsM=
=axEy
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.