I know you can edit the bash prompt permanently by editing the PS1 variable in your ~/.bashrc file, mine looks like this:
PS1="\[\e[0;31m\]<HERP(._.)DERP>\[\e[0;0m\]";
but can you set a tiny little image in there as well? For instance, if I wanted to add a little American flag icon, or something before “HERP(._.)DERP”, could I do this?
Sorry, no. Terminals don’t do graphics.
For a full description of what you can do, see the PROMPTING section of the bash(1) man page:
The
\e,\[and\]escape sequences deserve special attention. With these you can insert ANSI escape codes to command the terminal to change foreground color, background color, move the cursor, erase parts of the screen, and do other fancy tricks.That is, for instance, how your prompt changes color.
\[\e[0;31m\]sets the foreground color to red, and\[\e[0;0m\]resets it back to the default.