File tree Expand file tree Collapse file tree 4 files changed +59
-0
lines changed
tests/modules/programs/zsh Expand file tree Collapse file tree 4 files changed +59
-0
lines changed Original file line number Diff line number Diff line change 343343 in
344344 mkIf cfg . enable (
345345 lib . mkMerge [
346+ {
347+ warnings =
348+ lib . optionals
349+ ( cfg . dotDir != homeDir && ! lib . hasPrefix "/" cfg . dotDir && ! lib . hasPrefix "$" cfg . dotDir )
350+ [
351+ ''
352+ Using relative paths in programs.zsh.dotDir is deprecated and will be removed in a future release.
353+ Current dotDir: ${ cfg . dotDir }
354+ Consider using absolute paths or home-manager config options instead.
355+ You can replace relative paths or environment variables with options like:
356+ - config.home.homeDirectory (user's home directory)
357+ - config.xdg.configHome (XDG config directory)
358+ - config.xdg.dataHome (XDG data directory)
359+ - config.xdg.cacheHome (XDG cache directory)
360+ ''
361+ ] ;
362+ }
363+
346364 ( mkIf ( cfg . envExtra != "" ) {
347365 home . file . "${ dotDirRel } /.zshenv" . text = cfg . envExtra ;
348366 } )
Original file line number Diff line number Diff line change 171171 } ;
172172
173173 config = {
174+ warnings =
175+ lib . optionals ( ! lib . hasPrefix "/" cfg . history . path && ! lib . hasInfix "$" cfg . history . path )
176+ [
177+ ''
178+ Using relative paths in programs.zsh.history.path is deprecated and will be removed in a future release.
179+ Consider using absolute paths or home-manager config options instead.
180+ You can replace relative paths or environment variables with options like:
181+ - config.home.homeDirectory (user's home directory)
182+ - config.xdg.configHome (XDG config directory)
183+ - config.xdg.dataHome (XDG data directory)
184+ - config.xdg.cacheHome (XDG cache directory)
185+ Current history.path: ${ cfg . history . path }
186+ ''
187+ ] ;
188+
174189 programs . zsh . initContent = lib . mkMerge [
175190 ( lib . mkOrder 910 ''
176191 # History options should be set in .zshrc and after oh-my-zsh sourcing.
Original file line number Diff line number Diff line change 3535
3636 test . stubs . zsh = { } ;
3737
38+ test . asserts . warnings . expected = lib . optionals ( case == "relative" ) [
39+ ''
40+ Using relative paths in programs.zsh.dotDir is deprecated and will be removed in a future release.
41+ Current dotDir: subdir/subdir2
42+ Consider using absolute paths or home-manager config options instead.
43+ You can replace relative paths or environment variables with options like:
44+ - config.home.homeDirectory (user's home directory)
45+ - config.xdg.configHome (XDG config directory)
46+ - config.xdg.dataHome (XDG data directory)
47+ - config.xdg.cacheHome (XDG cache directory)
48+ ''
49+ ] ;
50+
3851 nmt . script =
3952 if case == "xdg-variable" then
4053 ''
Original file line number Diff line number Diff line change 4747
4848 test . stubs . zsh = { } ;
4949
50+ test . asserts . warnings . expected = lib . optionals ( case == "relative" ) [
51+ ''
52+ Using relative paths in programs.zsh.history.path is deprecated and will be removed in a future release.
53+ Consider using absolute paths or home-manager config options instead.
54+ You can replace relative paths or environment variables with options like:
55+ - config.home.homeDirectory (user's home directory)
56+ - config.xdg.configHome (XDG config directory)
57+ - config.xdg.dataHome (XDG data directory)
58+ - config.xdg.cacheHome (XDG cache directory)
59+ Current history.path: some/subdir/.zsh_history
60+ ''
61+ ] ;
62+
5063 nmt . script =
5164 if case == "xdg-variable" then
5265 ''
You can’t perform that action at this time.
0 commit comments