1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00
Commit graph

6 commits

Author SHA1 Message Date
Austin Horstman
d305eece82 zsh: fix zsh history substring search generation
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-10-10 16:06:46 -05:00
Austin Horstman
04f672b5db zsh/history: optimize history options with array-based loops
Replace individual setopt/unsetopt statements for history options with efficient
array-based loops. Also optimize history substring search key bindings using
the same pattern. Use lib.hm.zsh.define for consistent array formatting and
add unset statements to clean up temporary variables.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-09-27 13:18:01 -05:00
Austin Horstman
40af7ba06b 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>
2025-07-28 14:47:42 -05:00
Austin Horstman
938ecd797f zsh: fix lib function for env var path parsing
Allow env variables to be used and avoid mangling path.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-07-28 14:47:42 -05:00
Kristopher James Kent (kjkent)
9fca491587 zsh: improve histfile handling
Previously, a stateVersion check for 20.03 determined whether or not the input to
`programs.zsh.history.path` would be prepended with `$HOME`. However, this was not
communicated in the documentation, which stated the version check determined whether
the default histfile location would be in `programs.zsh.dotDir` or
`home.homeDirectory`.

The current change simplifies matters and brings path handling in-line with that of
the preceding work on dotDir path handling. If a relative path is provided, it is
parsed as being relative to `home.homeDirectory`. Both absolute and relative paths
are supported, and are cleaned before being passed to other functions.

Tests have been rewritten for the new logic, with case handling for reusability.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-07-25 13:15:29 -05:00
Austin Horstman
80a07bc6f7 zsh: move history to separate file
zsh is incredibly bloated, moving history to separate file

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-07-12 11:42:00 -05:00