update docs to specify XDG_CONFIG_HOME is a valid option

This commit is contained in:
Julien Rabinow 2020-12-03 01:37:20 -08:00 committed by Tomas Babej
parent 5256797ea9
commit dea098d155
2 changed files with 28 additions and 2 deletions

View file

@ -1314,6 +1314,10 @@ Specifies an alternate configuration file with highest priority.
.B TASKRC=<path-to-alternate-file> task .. .B TASKRC=<path-to-alternate-file> task ..
The environment variable specifies an alternate configuration file to use. The environment variable specifies an alternate configuration file to use.
.TP
.B XDG_CONFIG_HOME=<path-to-alternate-config-home> task ..
The environment variable specifies an alternate configuration file to use.
.TP .TP
.B task rc.<name>:<value> ... .B task rc.<name>:<value> ...
.B task rc.<name>=<value> ... .B task rc.<name>=<value> ...
@ -1340,7 +1344,10 @@ this man page.
.TP .TP
~/.taskrc ~/.taskrc
User configuration file - see also taskrc(5). Note that this can be User configuration file - see also taskrc(5). Note that this can be
overridden on the command line or by the TASKRC environment variable. overridden on the command line or by the TASKRC environment variable. Also, if
.I ~/.taskrc
doesn't exist and XDG_CONFIG_HOME environment variable is defined, taskwarrior
will check if $XDG_CONFIG_HOME/task/taskrc exists and attempt to read it
.TP .TP
~/.task ~/.task

View file

@ -9,6 +9,8 @@ taskrc \- Configuration details for the task(1) command
.B task rc:<directory-path>/.taskrc ... .B task rc:<directory-path>/.taskrc ...
.br .br
.B TASKRC=<directory-path>/.taskrc task ... .B TASKRC=<directory-path>/.taskrc task ...
.br
.B XDG_CONFIG_HOME=<directory-path>/task/taskrc task ...
.SH DESCRIPTION .SH DESCRIPTION
.B Taskwarrior .B Taskwarrior
@ -34,6 +36,12 @@ or using the TASKRC environment variable:
$ TASKRC=/tmp/.taskrc task ... $ TASKRC=/tmp/.taskrc task ...
.RE .RE
Additionally, if no ~/.taskrc exists, taskwarrior will check if the XDG_CONFIG_HOME environment variable is defined:
.RS
$ XDG_CONFIG_HOME=~/.config task ...
.RE
Individual options can be overridden by using the Individual options can be overridden by using the
.I rc.<name>: .I rc.<name>:
attribute when running task: attribute when running task:
@ -154,7 +162,7 @@ define a set of US holidays, and set up a 16-color theme to use, to color the
reports and calendar. reports and calendar.
.SH ENVIRONMENT VARIABLES .SH ENVIRONMENT VARIABLES
These environment variables override defaults and command line arguments. These environment variables override defaults, but not command-line arguments.
.TP .TP
.B TASKDATA=~/.task .B TASKDATA=~/.task
@ -163,6 +171,17 @@ This overrides the default path for the Taskwarrior data files.
.TP .TP
.B TASKRC=~/.taskrc .B TASKRC=~/.taskrc
This overrides the default RC file. This overrides the default RC file.
.RE
This environment variable will be checked if
.I ~/.taskrc
doesn't exist
.TP
.B XDG_CONFIG_HOME=~/.config
If set, taskwarrior will look for a
.I $XDG_CONFIG_HOME/task/taskrc
file
.SH CONFIGURATION VARIABLES .SH CONFIGURATION VARIABLES
Valid variable names and their default values are: Valid variable names and their default values are: