From 1486ff4246e30be8312bf7338d5bb1fb7ccaff9d Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 15 Nov 2024 17:06:29 +0100 Subject: [PATCH] wip/bash --- shell/bash.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/shell/bash.sh b/shell/bash.sh index 7b0f3c7..9e2b27e 100644 --- a/shell/bash.sh +++ b/shell/bash.sh @@ -1,13 +1,23 @@ -HISTCONTROL="ignorespace" +[ "$(cat /proc/$$/comm)" = "bash" ] || return -HISTSIZE=-1 +# completion -HISTTIMEFORMAT="%Y%m%d %H%M%S " file="/usr/share/bash-completion/bash_completion" if [ -f "${file}" ]; then . "${file}" fi + +# history + +HISTCONTROL="ignorespace" + +HISTSIZE=-1 + +HISTTIMEFORMAT="%Y%m%d %H%M%S " + +# prompt + ps1() { local date host local code="${1}"