[wellylug] Console prompt changing
dave.antliff at paradise.net.nz
Sun Aug 24 18:34:34 NZST 2003
Usually the prompt is 'programmed' somewhere like /etc/profile,
/etc/bashrc, ~/.bashrc, ~/.bash_profile, ...
For example, I program mine thusly:
PS1="\[\e[34m\]\h:\[\e[36m\]`pwd`\[\e[37m\] $ "
This looks like (e.g):
blackbird:~/src $ grep blah
With 'blackbird:' in blue, ~ in cyan, and $ and the commandline in white.
Actually I do a bit more than this, by tidying up the working directory
with a nice little function that keeps it a manageable number of
characters long (to stop it wrapping around in my xterm and making it
hard to read - I prefer partial and full paths to just the last path
(notice the '..')
But I dont want to confuse you so I'll leave that out unless anyone
asks for it.
> Message: 7
> From: Jethro Carr <dodocaptain at paradise.net.nz>
> To: LUG <wellylug at lists.naos.co.nz>
> Date: 24 Aug 2003 17:11:40 +1200
> Subject: [wellylug] Console prompt changing
> Reply-To: wellylug at lists.naos.co.nz
> Content-Type: text/plain
> Content-Transfer-Encoding: 7bit
> I've got a strange & probably basic problem. My console prompt used to
> be displayed in this format:
> [root at Presario root]#
> But for some reason, it changed to:
> This doesn't affect the root prompt, which is still the same. I don't
> remember editing any config files...
> Does anyone know what I did & how to fix it?
> I think it might be something as simple as a key combination...
> --- Jethro
> dodocaptain at paradise.net.nz
More information about the wellylug