mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
zsh: add cdpath
option (#1418)
This commit is contained in:
parent
f4f9f1a618
commit
9a473b693a
1 changed files with 12 additions and 0 deletions
|
@ -185,6 +185,14 @@ in
|
|||
type = types.nullOr types.bool;
|
||||
};
|
||||
|
||||
cdpath = mkOption {
|
||||
default = [];
|
||||
description = ''
|
||||
List of paths to autocomplete calls to `cd`.
|
||||
'';
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
dotDir = mkOption {
|
||||
default = null;
|
||||
example = ".config/zsh";
|
||||
|
@ -392,6 +400,10 @@ in
|
|||
home.file."${relToDotDir ".zshrc"}".text = ''
|
||||
typeset -U path cdpath fpath manpath
|
||||
|
||||
${optionalString (cfg.cdpath != []) ''
|
||||
cdpath+=(${concatStringsSep " " cfg.cdpath})
|
||||
''}
|
||||
|
||||
for profile in ''${(z)NIX_PROFILES}; do
|
||||
fpath+=($profile/share/zsh/site-functions $profile/share/zsh/$ZSH_VERSION/functions $profile/share/zsh/vendor-completions)
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue