From dea098d155c6cbf0b28ae5e4963f6c5d3de6232a Mon Sep 17 00:00:00 2001 From: Julien Rabinow Date: Thu, 3 Dec 2020 01:37:20 -0800 Subject: [PATCH] update docs to specify XDG_CONFIG_HOME is a valid option --- doc/man/task.1.in | 9 ++++++++- doc/man/taskrc.5.in | 21 ++++++++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/doc/man/task.1.in b/doc/man/task.1.in index 941058fb8..09974080c 100644 --- a/doc/man/task.1.in +++ b/doc/man/task.1.in @@ -1314,6 +1314,10 @@ Specifies an alternate configuration file with highest priority. .B TASKRC= task .. The environment variable specifies an alternate configuration file to use. +.TP +.B XDG_CONFIG_HOME= task .. +The environment variable specifies an alternate configuration file to use. + .TP .B task rc.: ... .B task rc.= ... @@ -1340,7 +1344,10 @@ this man page. .TP ~/.taskrc 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 ~/.task diff --git a/doc/man/taskrc.5.in b/doc/man/taskrc.5.in index 22cca4cd9..3dea0672e 100644 --- a/doc/man/taskrc.5.in +++ b/doc/man/taskrc.5.in @@ -9,6 +9,8 @@ taskrc \- Configuration details for the task(1) command .B task rc:/.taskrc ... .br .B TASKRC=/.taskrc task ... +.br +.B XDG_CONFIG_HOME=/task/taskrc task ... .SH DESCRIPTION .B Taskwarrior @@ -34,6 +36,12 @@ or using the TASKRC environment variable: $ TASKRC=/tmp/.taskrc task ... .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 .I rc.: 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. .SH ENVIRONMENT VARIABLES -These environment variables override defaults and command line arguments. +These environment variables override defaults, but not command-line arguments. .TP .B TASKDATA=~/.task @@ -163,6 +171,17 @@ This overrides the default path for the Taskwarrior data files. .TP .B TASKRC=~/.taskrc 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 Valid variable names and their default values are: