Skip to content

Commit

Permalink
Change -C and -D long option names
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mtreca authored and Lukas Fleischer committed Mar 13, 2019
1 parent ccdd339 commit 2c50f07
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions doc/calcurse.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand Down Expand Up @@ -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*.
Expand Down Expand Up @@ -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>>.

Expand Down
8 changes: 6 additions & 2 deletions src/args.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down Expand Up @@ -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'},
Expand Down

0 comments on commit 2c50f07

Please sign in to comment.