1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-26 08:28:30 +02:00

zsh: add autocd option

This commit is contained in:
kalium 2019-05-11 04:38:36 +09:00 committed by Nikita Uvarov
parent d2ed39f103
commit 02a07f19a1
No known key found for this signature in database
GPG Key ID: F7A5FB3A7C10EF96

View File

@ -149,6 +149,14 @@ in
programs.zsh = {
enable = mkEnableOption "Z shell (Zsh)";
autocd = mkOption {
default = null;
description = ''
Automatically enter into a directory if typed directly into shell.
'';
type = types.nullOr types.bool;
};
dotDir = mkOption {
default = null;
example = ".config/zsh";
@ -378,6 +386,7 @@ in
${if cfg.history.expireDuplicatesFirst then "setopt" else "unsetopt"} HIST_EXPIRE_DUPS_FIRST
${if cfg.history.share then "setopt" else "unsetopt"} SHARE_HISTORY
${if cfg.history.extended then "setopt" else "unsetopt"} EXTENDED_HISTORY
${if cfg.autocd != null then "${if cfg.autocd then "setopt" else "unsetopt"} autocd" else ""}
${cfg.initExtra}