From 01b93181d7f45d284bfc6abcaffe2d3a51e9f409 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Sat, 13 Apr 2024 21:51:35 +0200 Subject: common/zsh: better history options --- common/commandline/zsh.nix | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/common/commandline/zsh.nix b/common/commandline/zsh.nix index f11cb37..d1fdee7 100644 --- a/common/commandline/zsh.nix +++ b/common/commandline/zsh.nix @@ -66,11 +66,8 @@ in { }; setOptions = [ - "HIST_IGNORE_DUPS" - "SHARE_HISTORY" - "HIST_FCNTL_LOCK" - "NO_CLOBBER" "NO_CASE_GLOB" + "NO_CLOBBER" ]; }; @@ -83,6 +80,17 @@ in { # Completion is already handled by the GRML conf enableCompletion = false; + history = { + extended = true; + expireDuplicatesFirst = true; + ignoreDups = true; + ignorePatterns = ["run-help *"]; + + # different, for expireDuplicatesFirst + size = 1100; + save = 1000; + }; + # XDG dotDir = ".config/zsh"; history.path = "${config.xdg.dataHome}/zsh/zsh_history"; -- cgit v1.2.3