Skip to content

config file syntax: Support comments after the directive #521

Closed
aleszoulek opened this Issue May 23, 2012 · 1 comment

2 participants

@aleszoulek

It may be useful to support following syntax in redis.conf:

save 172800 1 # save snapshot every two days

At the moment it will raise:

*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 85
>>> 'save 172800 1 # save snapshot every two days'
Bad directive or wrong number of arguments

Writing comments after directives feels usual and natural in similar config files syntax. Redis being unable to parse them seems unexpected behaviour.

@mattsta mattsta added a commit to mattsta/redis that referenced this issue Aug 2, 2014
@mattsta mattsta Allow comments after config directives
Fixes #521
1782d04
@mattsta mattsta added a commit to mattsta/redis that referenced this issue Aug 6, 2014
@mattsta mattsta Allow comments after config directives
Fixes #521
271814d
@mattsta
mattsta commented Aug 7, 2014

Closing as "not allowed by design."

Reference: "Redis semantics explicitly forbid comments on the same lines as config directives in order for the config rewrite process to be easily able to retain comments (that are guaranteed to be in different lines) in the rewritten file using simple logic."

@mattsta mattsta closed this Aug 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.