Add support for $HOME/.tioconfig

Replaces what used to be $HOME/.tiorc
This commit is contained in:
Martin Lund 2022-12-07 04:07:43 +01:00
parent 6a955b08e1
commit 4e9d29c88d
2 changed files with 9 additions and 0 deletions

View file

@ -335,6 +335,8 @@ listed:
.I $XDG_CONFIG_HOME/tio/config
.PP
.I $HOME/.config/tio/config
.PP
.I $HOME/.tioconfig
.PP
Labels can be used to group settings into named sub-configurations which can be

View file

@ -385,6 +385,13 @@ static int resolve_config_file(void)
return 0;
}
free(c.path);
asprintf(&c.path, "%s/.tioconfig", home);
if (access(c.path, F_OK) == 0)
{
return 0;
}
free(c.path);
}
c.path = NULL;