zsh: relative path deprecation warning

Warn users when they configure a relative path. We want to encourage
using absolute paths and env variables.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
Austin Horstman 2025-07-28 10:08:42 -05:00
parent 9ff467fbe7
commit 40af7ba06b
4 changed files with 59 additions and 0 deletions

View file

@ -35,6 +35,19 @@ in
test.stubs.zsh = { };
test.asserts.warnings.expected = lib.optionals (case == "relative") [
''
Using relative paths in programs.zsh.dotDir is deprecated and will be removed in a future release.
Current dotDir: subdir/subdir2
Consider using absolute paths or home-manager config options instead.
You can replace relative paths or environment variables with options like:
- config.home.homeDirectory (user's home directory)
- config.xdg.configHome (XDG config directory)
- config.xdg.dataHome (XDG data directory)
- config.xdg.cacheHome (XDG cache directory)
''
];
nmt.script =
if case == "xdg-variable" then
''

View file

@ -47,6 +47,19 @@ in
test.stubs.zsh = { };
test.asserts.warnings.expected = lib.optionals (case == "relative") [
''
Using relative paths in programs.zsh.history.path is deprecated and will be removed in a future release.
Consider using absolute paths or home-manager config options instead.
You can replace relative paths or environment variables with options like:
- config.home.homeDirectory (user's home directory)
- config.xdg.configHome (XDG config directory)
- config.xdg.dataHome (XDG data directory)
- config.xdg.cacheHome (XDG cache directory)
Current history.path: some/subdir/.zsh_history
''
];
nmt.script =
if case == "xdg-variable" then
''