summaryrefslogtreecommitdiffstats
path: root/src/conf.c
diff options
context:
space:
mode:
authormongo <andmarti@gmail.com>2017-04-20 12:27:58 -0300
committermongo <andmarti@gmail.com>2017-04-20 12:27:58 -0300
commitbb9a33c0ff42afa37a13b34ebcadeb84b3597231 (patch)
treeabd8361abb3c70bd0a4e4a43220fa2490652f57d /src/conf.c
parent6f3c267b0d568f652fdaf313b574041e722bfb2b (diff)
add --version option to pass to argv
Diffstat (limited to 'src/conf.c')
-rw-r--r--src/conf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/conf.c b/src/conf.c
index d484abf..b0335c5 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -20,6 +20,7 @@ void store_default_config_values() {
put(user_conf_d, "debug", "0");
put(user_conf_d, "ignorecase", "0");
put(user_conf_d, "trigger", "1");
+ put(user_conf_d, "version", "0");
// we calc get gmtoffset
#ifdef USELOCALE
@@ -41,6 +42,9 @@ char * get_conf_values(char * salida) {
nl = user_conf_d->list;
salida[0]='\0';
while (nl != NULL) {
+ // ignore version conf variable here so that its not shown in :set command
+ if (! strcmp(nl->key, "version")) { nl = nl->next; continue; }
+
sprintf(salida + strlen(salida), "%s=%s\n", nl->key, nl->val);
nl = nl->next;
}