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}