From fff7d4005078e26c93d64bf1cf1f63440a21fd0e Mon Sep 17 00:00:00 2001 From: Mehdi Sadeghi Date: Tue, 12 Mar 2024 14:53:44 +0100 Subject: Fix prompt (extra -e in output) Moreover, remove debug prints (breaks SSH) --- .bashrc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '.bashrc') diff --git a/.bashrc b/.bashrc index f23a6f2..b7c210f 100644 --- a/.bashrc +++ b/.bashrc @@ -1,5 +1,4 @@ # .bashrc -echo .bashrc begin # Make a history backup since history is lost sometimes BACKUPS=~/Backups/$(date +%Y)/bash_hist/ @@ -9,7 +8,10 @@ cp ~/.bash_history $BACKUPS/$(date +%s) # Load ENV file (shared with POSIX shell) [ $0 != sh ] && [ -n "${ENV:=$HOME/.env}" ] && . "$ENV" -PS1='\[\033[1;33m\]$($HOME/.local/bin/prompt)\[\033[0m\]' +COLOR="\[$(tput setaf 3)\]" # yellow +RESET="\[$(tput sgr0)\]" + +PS1='\[$(tput setaf 3)\]$($HOME/.local/bin/prompt)\[$(tput sgr0)\]' # Warn if .bash_profile exists (since it will prevent loading .profile) [[ -f ~/.bash_profile ]] && echo WARN: .bash_profile exists @@ -51,5 +53,3 @@ _direnv_hook() { if ! [[ "${PROMPT_COMMAND:-}" =~ _direnv_hook ]]; then PROMPT_COMMAND="_direnv_hook${PROMPT_COMMAND:+;$PROMPT_COMMAND}" fi - -echo .bashrc end -- cgit v1.2.3