hstr icon indicating copy to clipboard operation
hstr copied to clipboard

PROMPT_COMMAND syntax error

Open antifa-ev opened this issue 6 years ago • 3 comments

I'm getting the following error with xfce4-terminal:

bash: PROMPT_COMMAND: line 12: syntax error near unexpected token `;'
bash: PROMPT_COMMAND: line 12: `history -a; history -n; history -a; history -n; history -a; history -n; ; printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"; printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'

antifa-ev avatar Jul 28 '18 15:07 antifa-ev

There seems to be a lot of duplicates in PROMPT_COMMAND environment variable. Can you please check (eventually share) .bashrc/.bash_profile for PROMPT_COMMAND changes?

BTW, the problem is with this semicolon: ...history -n; ; printf... - you just need to find a command that prepends/appends it.

dvorka avatar Jul 30 '18 20:07 dvorka

I second to 'antifa-ev'. Using Arch Linux with XFCE, this one works for me: export PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'history -a; history -n' Although printing it out with echo may still show command duplication but I have no bash error messages due to extra ';' anymore.

kzoli429 avatar Aug 19 '18 15:08 kzoli429

That thread helped me , thans

sapien47 avatar May 23 '19 21:05 sapien47