mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
zsh: add 'ignoreSpace' option
This option sets HIST_IGNORE_SPACE, which determines whether commands starting with a space are put in the history or not.
This commit is contained in:
parent
de8033747c
commit
a591e8f9e4
1 changed files with 10 additions and 0 deletions
|
@ -61,6 +61,15 @@ let
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ignoreSpace = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = ''
|
||||||
|
Do not enter command lines into the history list
|
||||||
|
if the first character is a space.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
expireDuplicatesFirst = mkOption {
|
expireDuplicatesFirst = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
|
@ -414,6 +423,7 @@ in
|
||||||
|
|
||||||
setopt HIST_FCNTL_LOCK
|
setopt HIST_FCNTL_LOCK
|
||||||
${if cfg.history.ignoreDups then "setopt" else "unsetopt"} HIST_IGNORE_DUPS
|
${if cfg.history.ignoreDups then "setopt" else "unsetopt"} HIST_IGNORE_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.expireDuplicatesFirst then "setopt" else "unsetopt"} HIST_EXPIRE_DUPS_FIRST
|
||||||
${if cfg.history.share then "setopt" else "unsetopt"} SHARE_HISTORY
|
${if cfg.history.share then "setopt" else "unsetopt"} SHARE_HISTORY
|
||||||
${if cfg.history.extended then "setopt" else "unsetopt"} EXTENDED_HISTORY
|
${if cfg.history.extended then "setopt" else "unsetopt"} EXTENDED_HISTORY
|
||||||
|
|
Loading…
Reference in a new issue