Shell Prompt Customization
I've just changed my shell to Bash, and I'm getting my shell prompt back to the way that I like it, and I thought that it would be interesting to see how some other *nix-heads have their prompt customized.
Here's how mine looks, except I have the window set to an off white/light yellow color, with only slight transparency:
[05:47 matthew:/usr/local/bin]$
FWIW, here's the code to do this in bash:
export PS1="\\[\\e[36;31m\\][\\A \\u\[\\e[36;34m\\]\\w\\[\\e[36;31m\\]]\\$ \\[\\e[36;0m\\]\\[\\e]2;\\h\w\\a\\]"
That last bit sets the titlebar of the terminal window to the hostname:current working directory.
Fun stuff like this can be done to the tcsh shell that is the default in OS X. If anyone wants to know how to set this up in tcsh, just let me know, and I can guide you through it really easily.
Edit: Isn't the [code] tag supposed to prevent smilies from showing up?
Here's how mine looks, except I have the window set to an off white/light yellow color, with only slight transparency:
[05:47 matthew:/usr/local/bin]$
FWIW, here's the code to do this in bash:
Code:
export PS1="\\[\\e[36;31m\\][\\A \\u\[\\e[36;34m\\]\\w\\[\\e[36;31m\\]]\\$ \\[\\e[36;0m\\]\\[\\e]2;\\h\w\\a\\]"
That last bit sets the titlebar of the terminal window to the hostname:current working directory.
Fun stuff like this can be done to the tcsh shell that is the default in OS X. If anyone wants to know how to set this up in tcsh, just let me know, and I can guide you through it really easily.
Edit: Isn't the [code] tag supposed to prevent smilies from showing up?
Comments
Mine's boring:
PS1='\\u@\\h\w]\\[\\e[36;0m\\]\\[\\e]2;\\h\w\\a\\]'
Back on topic, I kinda wonder how many others on AI have customized their prompt.... I knew I could count on you, 1337, but I know there are other shell users out there...
Originally posted by bauman
Back on topic, I kinda wonder how many others on AI have customized their prompt.... I knew I could count on you, 1337, but I know there are other shell users out there...
I haven't, but I'd like to. Hell, I'm still using tcsh eventhough everyone says bash is better. Just haven't got the time to do the change.