[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: was wondering



On Wed, 31 Dec 2003 00:23:39 +0100, 
Mario Vukelic <mario.vukelic@dantian.org> wrote in message 
<[🔎] 1072826619.17431.12.camel@sonic.home>:

> On Tue, 2003-12-30 at 23:46, Xzbenjudah7@aol.com wrote:
> > I have an old kernel 2.2.12 and I was wondering if it is possible to
> > get some source code to recompile the kernel with terminal font
> > color highlighting. I am not sure what to call it but its the font
> > that's typed whenever your at a prompt. A different color for
> > directories and another for executable files exetra...    
> 
> The kernel has _nothing_ to do with this at all, leave it alone. You
> want to have the terminal font colors set in a config file for your
> shell, probably /etc/profile
> Put this in there:
> 
> # If running interactively, then:
> if [ "$PS1" ]; then
>     # enable color support of ls
>     eval `dircolors -b`
>     alias ls='ls --color=auto'
> fi
> 
> (dircolors is a part of the fileutils package).
> Also nice: red prompt for root, green for users:
> 
> if [ "$SHELL" = '/bin/bash' ] || [ "$SHELL" = '/bin/sh' ]
> then
>         if [ "`id -u`" -eq 0 ]
>         then
>                 PS1='\[\033[01;31m\]\u@\h: \[\033[01;34m\]\w \$
> \[\033[00m\]'
>         else
>                 PS1='\[\033[01;32m\]\u@\h: \[\033[01;34m\]\w \$
> \[\033[00m\]'
>         fi
> fi

..or PS1='\[\033[1;33m\]\u\[\033[1;37m\]@\[\033[1;32m\]\H\[\033
[1;37m\]:\[\0 33[1;31m\]\w \[\033[1;36m\]\$ \[\033[0m\]' ;-)


-- 
..med vennlig hilsen = with Kind Regards from Arnt... ;-)
...with a number of polar bear hunters in his ancestry...
  Scenarios always come in sets of three: 
  best case, worst case, and just in case.




Reply to: