mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Context: Adjust styling
This commit is contained in:
parent
dea098d155
commit
1f98b9d128
1 changed files with 10 additions and 10 deletions
|
@ -462,23 +462,23 @@ int Context::initialize (int argc, const char** argv)
|
||||||
// XDG_CONFIG_HOME doesn't count as an override (no warning header)
|
// XDG_CONFIG_HOME doesn't count as an override (no warning header)
|
||||||
if (! rc_file.exists ())
|
if (! rc_file.exists ())
|
||||||
{
|
{
|
||||||
const char* xdg_config_home = getenv ("XDG_CONFIG_HOME");
|
const char* xdg_config_home = getenv ("XDG_CONFIG_HOME");
|
||||||
if (! xdg_config_home)
|
if (! xdg_config_home)
|
||||||
xdg_config_home = format ("{1}/.config", home_dir).c_str();
|
xdg_config_home = format ("{1}/.config", home_dir).c_str();
|
||||||
|
|
||||||
// https://github.com/GothenburgBitFactory/libshared/issues/32
|
// https://github.com/GothenburgBitFactory/libshared/issues/32
|
||||||
std::string rcfile_path = format ("{1}/task/taskrc", xdg_config_home);
|
std::string rcfile_path = format ("{1}/task/taskrc", xdg_config_home);
|
||||||
|
|
||||||
File maybe_rc_file = File (rcfile_path);
|
File maybe_rc_file = File (rcfile_path);
|
||||||
if ( maybe_rc_file.exists ())
|
if ( maybe_rc_file.exists ())
|
||||||
rc_file = maybe_rc_file;
|
rc_file = maybe_rc_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *override = getenv ("TASKRC");
|
char *override = getenv ("TASKRC");
|
||||||
if (override)
|
if (override)
|
||||||
{
|
{
|
||||||
rc_file = File (override);
|
rc_file = File (override);
|
||||||
taskrc_overridden = true;
|
taskrc_overridden = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
taskrc_overridden =
|
taskrc_overridden =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue