and maintainer of:
I have for a long time used the following prompt in my bash shell:
S1="\h \w\n\r% "
I do however sometimes resort to wanting to copy a path and command to another terminal, where I would just write
The % would however give the following error message when pasted:
-bash: fg: %: no such job
So I changed it to:
PS1="\h \w\n\r; "
Warning gone, I could remove the hostname to make it easier to copy it.
In addition to the bash prompt, I find the following to prompt useful:
MYSQL_PS1="(\u@\h) [\d]> "
For PostgreSQL (from
\set PROMPT1 '(%n@%m) [%/]>'
These show the user, hostname and database. Having the two database engine prompt being uniform, is quite nice.
I found the following tip however, which includes transactional state in the prompt. This could prove quite useful.
prompt suggestions and examples welcome