mirror of
https://github.com/nix-community/home-manager
synced 2024-12-28 04:39:48 +01:00
zsh: Add zsh.history.ignoreAllDups
config option (#4248)
This commit is contained in:
parent
a4f4508791
commit
15043a6591
1 changed files with 11 additions and 0 deletions
|
@ -79,6 +79,16 @@ let
|
|||
'';
|
||||
};
|
||||
|
||||
ignoreAllDups = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
If a new command line being added to the history list
|
||||
duplicates an older one, the older command is removed
|
||||
from the list (even if it is not the previous event).
|
||||
'';
|
||||
};
|
||||
|
||||
ignoreSpace = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
|
@ -588,6 +598,7 @@ in
|
|||
|
||||
setopt HIST_FCNTL_LOCK
|
||||
${if cfg.history.ignoreDups then "setopt" else "unsetopt"} HIST_IGNORE_DUPS
|
||||
${if cfg.history.ignoreAllDups then "setopt" else "unsetopt"} HIST_IGNORE_ALL_DUPS
|
||||
${if cfg.history.ignoreSpace then "setopt" else "unsetopt"} HIST_IGNORE_SPACE
|
||||
${if cfg.history.expireDuplicatesFirst then "setopt" else "unsetopt"} HIST_EXPIRE_DUPS_FIRST
|
||||
${if cfg.history.share then "setopt" else "unsetopt"} SHARE_HISTORY
|
||||
|
|
Loading…
Reference in a new issue