Loading
Home ›
Customized Bash Prompts with the PS1 Variable
Trending Topics
| Dia - The Diagram Creation Tool | Feb 13, 2012 |
| You Need A Budget | Feb 10, 2012 |
| The Linux powered LAN Gaming House | Feb 08, 2012 |
| Creating a vDSO: the Colonel's Other Chicken | Feb 06, 2012 |
| Your CMS Is Not Your Web Site | Feb 01, 2012 |
| Casper, the Friendly (and Persistent) Ghost | Jan 31, 2012 |
- Fun with ethtool
- Linux--The Internet Appliance?
- Dia - The Diagram Creation Tool
- Readers' Choice Awards 2011
- Validate an E-Mail Address with PHP, the Right Way
- Stack Backtracing Inside Your Program
- Python for Android
- LiS: Linux STREAMS
- Building a Two-Node Linux Cluster with Heartbeat
- Three-Tier Architecture
- Dia
4 hours 31 min ago - Service units, is a daemon
6 hours 7 min ago - Tcp
6 hours 27 min ago - Lamenting more development of Dia
12 hours 19 min ago - multiboot that works well for me
22 hours 9 min ago - What's a good, AFFORDABLE aka
22 hours 10 min ago - Employment Posters
1 day 13 hours ago - Sure the best distro is
1 day 14 hours ago - BeOS was the best
1 day 17 hours ago - I use Wireshark on a daily
1 day 22 hours ago





Comments
I can't get it to remember
I can't get it to remember the variable!
Best bash prompt
\w `if [ $? = 0 ]; then echo :\\); else echo :\\(; fi`
Sets your prompt to a smiley if the last command succeeded.
Sets a frowny if the previous command's return code is anything other than 0
~ :) true
~ :) false
~ :( true
~ :)
How about including the link?
It's http://pastebin.com/f2309fd10.
Suggestion for tutorial...
How about a demo/tutorial on changing the title bar on an Xterm window. Perhaps with pointers to documentation and settings that can be used.
This would be useful if you have serveral windows open on various servers and need to identify them quickly.
The best Bash prompt?
Use your favourite search engine to look for smiley bash prompt.