less: store 'lesskey' under XDG_CONFIG_HOME
Less clutter in the $HOME.
This commit is contained in:
parent
736581f113
commit
829e89a16f
|
@ -2280,6 +2280,16 @@ in
|
|||
modules.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2021-12-08T10:23:42+00:00";
|
||||
condition = config.programs.less.enable;
|
||||
message = ''
|
||||
The 'lesskey' configuration file is now stored under
|
||||
'$XDG_CONFIG_HOME/lesskey' since it is fully supported upstream
|
||||
starting from v596.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ in {
|
|||
'';
|
||||
description = ''
|
||||
Extra configuration for <command>less</command> written to
|
||||
<filename>$HOME/.lesskey</filename>.
|
||||
<filename>$XDG_CONFIG_HOME/lesskey</filename>.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
@ -27,6 +27,6 @@ in {
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ pkgs.less ];
|
||||
home.file.".lesskey".text = cfg.keys;
|
||||
xdg.configFile."lesskey".text = cfg.keys;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -15,8 +15,8 @@ with lib;
|
|||
test.stubs.less = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.lesskey
|
||||
assertFileContent home-files/.lesskey ${
|
||||
assertFileExists home-files/.config/lesskey
|
||||
assertFileContent home-files/.config/lesskey ${
|
||||
builtins.toFile "less.expected" ''
|
||||
s back-line
|
||||
t forw-line
|
||||
|
|
Loading…
Reference in a new issue