LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Customizing the command prompt (https://www.linuxquestions.org/questions/linux-general-1/customizing-the-command-prompt-381488/)

sweetnsourbkr 11-09-2005 12:25 PM

Customizing the command prompt
 
I'm looking to make my command prompt (PS1) look better. I've already made colors come out and placed my login, host, date, and pwd on it. It looks aight. Does anyone know how I can call out better looking characters? Maybe like those that BitchX uses on its screens? Something like a color fading line would be a nice effect ...

Any resources would be appreciated!

oneandoneis2 11-10-2005 05:00 AM

Better looking characters? Are you talking about changing the font?

If so, you need to define the font you want used in the .Xdefaults file (for Xterms, Aterms and the like). Changing console fonts is slightly trickier - take a look at /etc/init.d/kbd and /etc/sysconfig/console

Fancy colour schemes might call for more colours that your terminals support - LFS has a good hint on compiling Xterms with 256 colours, you may find it helps.

The only thing I ever found really useful to do to the prompt myself, tho, was to add a carriage return at the start so there's always a blank line between commands - breaks things up nicely :)

sweetnsourbkr 11-10-2005 09:13 AM

No, not the font ... just add a few special ASCII characters in different colors. I've seen people have such prompts, which is why I'm asking today. Since they're plain ASCII, I'm assuming they work in every terminal, whether it's text or graphical.

I guess I'm looking to get the PS1 codes for all ASCII characters, and all color variation codes as well. This should be what I'm after.

TruckStuff 11-10-2005 09:28 AM

I'm assuming you've read man bash and info bash, so you may want to try this: http://www.freebsddiary.org/prompt.php. Be sure to check out the link at the bottom of that page.

sweetnsourbkr 11-10-2005 01:34 PM

Ok, I think I figured it out ... I was hoping someone would give me the answer quickly, but that's ok. Also, it seems like oneandoneis2 is right about the different terminals. Depending on what kind of machine I'm on, it'll display the ascii codes that that machine supports.


All times are GMT -5. The time now is 01:30 PM.