desktop entry spec 0.9.7 Exec key parsing

Dan Winship danw at novell.com
Mon Oct 30 20:13:24 EET 2006


The Exec key parsing text got rewritten to not refer vaguely to a
13-year-old RFC, which is nice, but now that it's explicit, it's also
totally wrong ;-)

    * It says that backslashes only escape text within double quotes,
      but GNOME and KDE both parse

          one\ word

      as one word and

          \"two words\"

      as two.

    * It talks about double quotes, but not single quotes (implying that
      single quotes would be passed through to the application
      unchanged). GNOME and KDE both allow arguments to be single
      quoted, and backslashes have no effect inside single quotes.

    * It says "arguments may be quoted in whole", but both GNOME and KDE
      also allow quoting arguments in part. Eg

          foo" bar"

      is the same as

          "foo bar"

    * There are two explicit lists of reserved characters that are
      assumed to be treated specially, but neither GNOME nor KDE
      actually treats *exactly* that set of characters specially.

If you want to specify the syntax and semantics rigorously, then you
either need to look at what the existing implementations actually do, or
declare that the existing implementations are wrong (in which case bye
bye 1.0). The simplest solution is probably to just handwave and say
things like "you should quote arguments that use special characters that
might be interpreted specially by shells".

-- Dan





More information about the xdg mailing list