Meu prompt Bash se apaga ao deletar o texto depois dele ou indo longe demais no histórico.
Ao efetuar login, o prompt parece normal. Há colchetes brancos em torno de um nome de usuário colorido e, em seguida, um branco & gt; como o meu prompt, no entanto, se eu subir duas vezes no meu histórico, o comando history substitui o meu prompt:
[stonewareslord] > #Initial prompt. stonewareslord is green
| Cursor is above this pipe symbol
[stonewareslord] > ls #Up arrow pressed once. ls was my last command. Colors are normal, ls is white
| Cursor is above this pipe symbol
pwdonewareslord] > ls #Up arrow a second time. pwd overwrite [st. pwd is white and the other colors are normal.
| Cursor is above this pipe symbol
Também acontece quando eu apago o comando:
[stonewareslord] > ls #Typed command after initial prompt. stonewareslord is green
| Cursor is above this pipe symbol
[stonewareslord] > l #Deleted one character
| Cursor is above this pipe symbol
#Deleted second character (line is blank). Anything I type is white
| Cursor is above this pipe symbol
As linhas no bashrc que provavelmente poderiam ter afetado isso são:
color='\e[0;32m' #Green
reset='\e[0m' #Color is set back to normal (white)
prompt(){
printf "[$color%s$reset]>" `whoami`
}
PS1=""
PROMPT_COMMAND=prompt
export HISTFILESIZE=
export HISTSIZE=
export HISTTIMEFORMAT="%Y-%m-%d_%H:%M:%S "
export HISTFILE=~/.bash_eternal_history
readonly HOME
readonly HISTIGNORE