aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvxid <maxime.treca@gmail.com>2019-03-13 15:47:22 +0100
committerLukas Fleischer <lfleischer@calcurse.org>2019-03-13 17:01:54 +0100
commit2c50f0700ae9f5631b538f4dc2d0797e31985178 (patch)
tree9d2b3b3331186a43639f57f689e60ca646a89e04
parentccdd3391f3304219b5c90f29eb9a7b83f37a4362 (diff)
downloadcalcurse-2c50f0700ae9f5631b538f4dc2d0797e31985178.tar.gz
calcurse-2c50f0700ae9f5631b538f4dc2d0797e31985178.zip
Change -C and -D long option names
The config dir long option has been changed from --conf to --confdir. The data dir long option has been changed from --directory to --datadir. Both old options are kept for backward compatibility but are removed from the manual. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
-rw-r--r--doc/calcurse.1.txt8
-rw-r--r--src/args.c8
2 files changed, 10 insertions, 6 deletions
diff --git a/doc/calcurse.1.txt b/doc/calcurse.1.txt
index 4d202c8..27c5aec 100644
--- a/doc/calcurse.1.txt
+++ b/doc/calcurse.1.txt
@@ -42,7 +42,7 @@ SYNOPSIS
--------
--
-*calcurse* [-D 'directory'] [-C 'confdir'] [-c 'calendar-file']
+*calcurse* [-D 'datadir'] [-C 'confdir'] [-c 'calendar-file']
*calcurse* -Q [*--from* 'date'] [*--to* 'date' | *--days* 'number']
@@ -147,12 +147,12 @@ are marked "('also interactively')".
absolute path name, it is interpreted relative to the current working
directory. The option has precedence over *-D*.
-*-C* 'dir', *--conf* 'dir'::
+*-C* 'dir', *--confdir* 'dir'::
('also interactively') Specify the configuration directory to use. If not
specified, the default directory is *~/.calcurse/*. See <<_files,FILES>> for
the interaction with *-D*.
-*-D* 'dir', *--directory* 'dir'::
+*-D* 'dir', *--datadir* 'dir'::
('also interactively') Specify the (data) directory to use. If not specified,
the default directory is *~/.calcurse/*. See section <<_files,FILES>> for
the interaction with *-C*.
@@ -654,7 +654,7 @@ An alternative calendar file may be specified with the *-c* option.
Configuration files
~~~~~~~~~~~~~~~~~~~
-The +conf+ file contains the user configuration and the +keys+ file
+The +conf+ file contains the user configuration and the +keys+ file
the user-defined key bindings. The +hooks+ directory contains user-supplied
scripts, see <<_hooks,Hooks>>.
diff --git a/src/args.c b/src/args.c
index 8443454..54eb52a 100644
--- a/src/args.c
+++ b/src/args.c
@@ -143,9 +143,9 @@ static void help_arg(void)
putchar('\n');
printf("%s\n", _("Miscellaneous:"));
printf("%s\n", _(" -c, --calendar <file> The calendar data file to use"));
- printf("%s\n", _(" -C, --conf <directory> The configuration directory to use"));
+ printf("%s\n", _(" -C, --confdir <dir> The configuration directory to use"));
printf("%s\n", _(" --daemon Run notification daemon in the background"));
- printf("%s\n", _(" -D, --directory <dir> The data directory to use"));
+ printf("%s\n", _(" -D, --datadir <dir> The data directory to use"));
printf("%s\n", _(" -g, --gc Run the garbage collector"));
printf("%s\n", _(" -h, --help Show this help text"));
printf("%s\n", _(" -i, --import <file> Import iCal data from file"));
@@ -436,8 +436,12 @@ int parse_args(int argc, char **argv)
struct option longopts[] = {
{"appointment", no_argument, NULL, 'a'},
{"calendar", required_argument, NULL, 'c'},
+ /* Deprecated */
{"conf", required_argument, NULL, 'C'},
+ {"confdir", required_argument, NULL, 'C'},
{"day", required_argument, NULL, 'd'},
+ {"datadir", required_argument, NULL, 'D'},
+ /* Deprecated */
{"directory", required_argument, NULL, 'D'},
{"filter", no_argument, NULL, 'F'},
{"gc", no_argument, NULL, 'g'},