From 3919a87d9e19fe9544947bf15fe2b06c1cdaf804 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 25 Aug 2021 12:22:21 +0200 Subject: [PATCH 1/3] home: zsh: do not share history accross shells It's more annoying than helpful... --- home/zsh/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/zsh/default.nix b/home/zsh/default.nix index 96ec251..27077cf 100644 --- a/home/zsh/default.nix +++ b/home/zsh/default.nix @@ -18,7 +18,7 @@ in extended = false; ignoreSpace = true; ignoreDups = true; - share = true; + share = false; path = "${config.xdg.dataHome}/zsh/zsh_history"; }; From d21087ddcd615f27dacf0ea128417adcedb8ee4f Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 25 Aug 2021 12:44:42 +0200 Subject: [PATCH 2/3] home: zsh: append to history Otherwise the file is replaced rather than appended to. --- home/zsh/options.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/home/zsh/options.zsh b/home/zsh/options.zsh index b02ca54..6187f46 100644 --- a/home/zsh/options.zsh +++ b/home/zsh/options.zsh @@ -8,5 +8,7 @@ setopt autopushd pushdminus pushdsilent setopt rcquotes # Single word commands can resume an existing job setopt autoresume +# Append commands to history as they are exectuted +setopt inc_append_history_time # Those options aren't wanted unsetopt beep extendedglob notify From 11fbbd62eba3f7524e2f73ec27fd4ce8cd21ff6a Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 25 Aug 2021 12:51:38 +0200 Subject: [PATCH 3/3] home: zsh: clean-up blank in history --- home/zsh/options.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/home/zsh/options.zsh b/home/zsh/options.zsh index 6187f46..e1e31f4 100644 --- a/home/zsh/options.zsh +++ b/home/zsh/options.zsh @@ -10,5 +10,7 @@ setopt rcquotes setopt autoresume # Append commands to history as they are exectuted setopt inc_append_history_time +# Remove useless whitespace from commands +setopt hist_reduce_blanks # Those options aren't wanted unsetopt beep extendedglob notify