Luke Shumaker 82fa79c786 option_parser.c: Allow comments on lines with quoted strings.
The current behavior is
 - If the value contains a double-quote:
   - 1. Verify that it must contains at least two quotes.
   - 2. If one of the quotes is the first character, trim it.
   - 3. If one of the quotes is the last character, trim it.
 - Else:
   - 1. Trim a trailing comment from the value.

This has the effect that

    `key = "value" # comment` => `value" #comment`

This is surprising and almost certainly not what the user wants.

However, it allows simple nested quotes like:

    `key = "A string "with quotes""` => `A string "with quotes"`

Fix the brokenness of the first example at the expense of breaking the
second.  A user seeking that value will now have to type:

    key = "A string \"with quotes\""

Do this by treating double-quote as a toggle that simply changes whether
`;` and `#` start comments (not too different than Bash using it to toggle
field separation).

In order to have strings that contain a literal double-quote, add
rudimentary support for backslash-escaping.  For now, only recognize
double-quote and backslash-itself; anything else is undefined; and the
program is free to do whatever it likes with them; for now, silently treat
the backslash as an ordinary character.

Note that this formulation of quoting implies that backslash-escaping works
identically both inside and outside of quotes.
2017-02-26 09:35:06 -05:00
2017-02-05 13:00:59 +02:00
2016-12-21 01:57:16 -03:00
2017-01-13 19:10:12 +01:00
2012-09-27 12:17:25 +02:00
2013-01-17 00:39:47 +01:00
2016-11-19 12:15:39 +02:00
2017-02-15 13:31:51 +01:00
2017-01-29 16:18:22 -03:00

Build Status

Dunst

Description

Dunst is a highly configurable and lightweight notification daemon.

Compiling

Dunst has a number of build dependencies that must be present before attempting configuration. The names are different depending on distribution:

  • dbus
  • libxinerama
  • libxft
  • libxss
  • libxdg-basedir
  • glib
  • pango/cairo
  • libgtk2.0

Checkout the wiki for more information.

Bug reports

Please use the issue tracker provided by GitHub to send us bug reports or feature requests. You can also join us on the IRC channel #dunst on Freenode.

Mantainers

Nikos Tsipinakis nikos@tsipinakis.com

Jonathan Lusso jonilusso@gmail.com

Author

written by Sascha Kruse dunst@knopwob.de

copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information)

If you feel that copyrights are violated, please send me an email.

Description
Lightweight and customizable notification daemon
Readme 6.8 MiB
Languages
C 95.1%
Shell 3.3%
Makefile 1.4%
Awk 0.2%