diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-02-22 11:36:33 +0100 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-02-24 22:48:26 +0100 |
commit | 3bc9497fc84abca0493083c3c208f0d2738bed38 (patch) | |
tree | 5f50bbd93b1885298df17c1d24848547c7813aa1 /src/args.c | |
parent | f76e1cce404418cef74772536f2f5ac3a79b7b99 (diff) | |
download | calcurse-3bc9497fc84abca0493083c3c208f0d2738bed38.zip |
Add a read-only option
We don't save any configuration nor items if this is set. This should be
used with care, and hence there's no short option for this.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/args.c')
-rw-r--r-- | src/args.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -51,7 +51,8 @@ enum { OPT_FMT_RAPT, OPT_FMT_EV, OPT_FMT_REV, - OPT_FMT_TODO + OPT_FMT_TODO, + OPT_READ_ONLY }; /* @@ -665,6 +666,7 @@ parse_args (int argc, char **argv) {"format-event", required_argument, NULL, OPT_FMT_EV}, {"format-recur-event", required_argument, NULL, OPT_FMT_REV}, {"format-todo", required_argument, NULL, OPT_FMT_TODO}, + {"read-only", no_argument, NULL, OPT_READ_ONLY}, {NULL, no_argument, NULL, 0} }; @@ -793,6 +795,9 @@ parse_args (int argc, char **argv) case OPT_FMT_TODO: fmt_todo = optarg; break; + case OPT_READ_ONLY: + read_only = 1; + break; default: usage (); usage_try (); |