From 06a984e4ff62b3f07e7e41ff93b45f0b759c9c56 Mon Sep 17 00:00:00 2001 From: Mats Rauhala Date: Wed, 6 Jun 2018 23:32:46 +0300 Subject: [PATCH] zsh: add extended, expireDuplicatesFirst history options --- modules/programs/zsh.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/modules/programs/zsh.nix b/modules/programs/zsh.nix index c07e8a74c..91ce16755 100644 --- a/modules/programs/zsh.nix +++ b/modules/programs/zsh.nix @@ -50,6 +50,18 @@ let ''; }; + expireDuplicatesFirst = mkOption { + type = types.bool; + default = false; + description = "Expire duplicates first"; + }; + + extended = mkOption { + type = types.bool; + default = false; + description = "Save timestamp into the history file"; + }; + share = mkOption { type = types.bool; default = true; @@ -333,7 +345,9 @@ in setopt HIST_FCNTL_LOCK ${if cfg.history.ignoreDups then "setopt" else "unsetopt"} HIST_IGNORE_DUPS + ${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 ${cfg.initExtra}