From e466c25a3ca7b2ea591438021677ca91b72e463f Mon Sep 17 00:00:00 2001 From: "SilverAg.L" Date: Mon, 1 Dec 2025 12:17:40 +0800 Subject: [PATCH] to make sure terminal histories are always DROPPED when reboot. --- .zprofile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.zprofile b/.zprofile index a6cffc0..613f0da 100644 --- a/.zprofile +++ b/.zprofile @@ -6,6 +6,13 @@ mkdir -p /tmp/$USER ln -s /tmp/$USER $HOME/.tmp } +# [[ -L ~/.zhistory && -L ~/.zsh_history && -L ~/.bash_history ]] || { +touch /run/user/$UID/.history +ln -sf /run/user/$UID/.history ~/.zhistory +ln -sf /run/user/$UID/.history ~/.zsh_history +ln -sf /run/user/$UID/.history ~/.bash_history +# } + # avoid dumplicate env appending. # [[ -f /run/user/$UID/.zshlogon ]] && return # touch /run/user/$UID/.zshlogon