From 2a89b8ff22d6f2668366e8df5989a56c56bdc5cc Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Tue, 11 Sep 2018 14:13:18 +0200 Subject: [PATCH] evolinux-base: better shell history * remove duplicates from history * reload/save history at prompt time --- evolinux-base/tasks/root.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/evolinux-base/tasks/root.yml b/evolinux-base/tasks/root.yml index 8fb2d113..1ff3b609 100644 --- a/evolinux-base/tasks/root.yml +++ b/evolinux-base/tasks/root.yml @@ -14,9 +14,11 @@ create: yes state: present with_items: - - "export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoreboth" + - "export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoreboth,erasedups" - "export HISTSIZE=65535" - "export HISTTIMEFORMAT=\"%c : \"" + - "shopt -s histappend" + - "PROMPT_COMMAND=\"history -a;history -n;${PROMPT_COMMAND}\"" when: evolinux_root_bashrc ## .bash_history should be append-only