Allow spaces in argument values. #1

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@jhesch

Hi Evan,

I was very pleased to find your rrd graph module. However, I wasn't able to include spaces in graph titles, etc., so I patched the module to replace tildes with spaces. Here it is if you'd like to merge it in.

Thanks,
Jacob


This is a hack to allow spaces in argument values (for example, for
arguments like --title). The hack is to have the module substitute all
occurrences of tilde in the URI with spaces before passing the
arguments to rrdtool.

It comes at the cost of losing the ability to place literal tilde
characters in graph text, which is not likely to be a problem in
practice. If it is found to be a problem, perhaps the character to
substitue (or the feature altogether) could be controlled with a
module directive.

@jhesch jhesch Allow spaces in argument values.
This is a hack to allow spaces in argument values (for example, for
arguments like --title). The hack is to have the module substitute all
occurrences of tilde in the URI with spaces before passing the
arguments to rrdtool.

It comes at the cost of losing the ability to place literal tilde
characters in graph text, which is not likely to be a problem in
practice. If it is found to be a problem, perhaps the character to
substitue (or the feature altogether) could be controlled with a
module directive.
fb323a0
@evanmiller
Owner

The proper solution would be to use quoted strings, e.g. --title="Foo Bar". Try this

a67111a

@evanmiller evanmiller closed this May 16, 2012
@jhesch

That is a nicer solution, except that the quotes are passed to rrd_graph_v which renders them literally in the title. Ideally the module would also strip quotes out of the string before passing it to rrd_graph_v.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment