Allow passing both "-D" and "-c"

This is particularly useful if one wants to use configuration and key
bindings from a specific directory, while using an appointment file from
somewhere else. "-c" has precedence over "-D".

Also update the usage message, man page and documentation.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer
2012-06-27 12:07:02 +02:00
parent 7a75415a61
commit 86c465b0e5
4 changed files with 53 additions and 58 deletions

View File

@@ -42,7 +42,7 @@ Synopsis
--------
[verse]
*calcurse* [*-h*|*-v*] [*-an*] [*-t*[num]] [*-c*<file> | *-D*<dir>]
*calcurse* [*-h*|*-v*] [*-an*] [*-t*[num]] [*-c*<file>] [*-D*<dir>]
[*-i*<file>] [*-x*[format]] [*-d* <date>|<num>]
[*-s*[date]] [*-r*[range]] [*-S* <regex>] [*--status*]
@@ -65,9 +65,8 @@ The following options are supported:
from which to read the appointments can be specified using the *-c* flag.
*-c* <file>, *--calendar* <file>::
Specify the calendar file to use. The default calendar is
*~/.calcurse/apts* (see section 'FILES' below). This option is incompatible
with -*D*.
Specify the calendar file to use. The default calendar is *~/.calcurse/apts*
(see section 'FILES' below). This option has precedence over *-D*.
*-d* <date|num>, *--day* <date|num>::
Print the appointments for the given date or for the given number of
@@ -100,8 +99,8 @@ menu. Four formats are available:
appointments can be specified using the *-c* flag.
*-D* <dir>, *--directory* <dir>::
Specify the data directory to use. This option is incompatible with -c.
If not specified, the default directory is *~/.calcurse/*.
Specify the data directory to use. If not specified, the default directory is
*~/.calcurse/*.
*--format-apt* <format>::
Specify a format to control the output of appointments in non-interactive

View File

@@ -181,8 +181,9 @@ long options are supported):
from which to read the appointments can be specified using the `-c` flag.
`-c <file>, --calendar <file>`::
Specify the calendar file to use. The default calendar is
`~/.calcurse/apts` (see section <<basics_files,calcurse files>>).
Specify the calendar file to use. The default calendar is `~/.calcurse/apts`
(see section <<basics_files,calcurse files>>). This option has precedence
over `-D`.
`-d <date|num>, --day <date|num>`::
Print the appointments for the given date or for the given number of
@@ -206,8 +207,8 @@ Note: as for the `-a` flag, the calendar from which to read the appointments
can be specified using the `-c` flag.
`-D <dir>, --directory <dir>`::
Specify the data directory to use. This option is incompatible with -c.
If not specified, the default directory is `~/.calcurse/`.
Specify the data directory to use. If not specified, the default directory is
`~/.calcurse/`.
`--format-apt <format>`::
Specify a format to control the output of appointments in non-interactive