Previously, `config.programs.zsh.dotDir` prepended strings with `$HOME`.
This caused issues like nix-community#5100, where `$HOME` is
inconsistently resolved in time for the evaluation of the option. The handling
of this variable is also inconsistent with how paths are handled elsewhere,
including within the same module, where `config.programs.zsh.history.path`
does not mutate the supplied string.
To preserve backwards compatibility, this change prepends
`config.home.homeDirectory` to relative paths, while assigning absolute paths
unchanged. Tests for both cases are added.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Autocompletion scripts and additional plugin functions are located in
specific directories that might not match the plugin source script but
need to be included in fpath before calling compinit.
An option to provide a path to these scripts is added to add the paths
to fpath before calling completionInit.
Co-authored-by: @zimeg <zim@o526.net>