Re: how to make colour prompts for pdksh
On Tue, 2006-07-25 at 22:59 +0200, LeVA wrote:
> 2006. July 25. 21:20, James Strandboge:
> > So a no frills color prompt without the title might be:
> > PS1='^[[0;32m[$USER@${HOST} ${PWD##*/}]$^[[m '
> >
> Thanks a lot for the reply, I've tried it and it stays the same :\ just
> spits out the characters, and no colours.
$ apt-cache policy pdksh
pdksh:
Installed: 5.2.14-18
Candidate: 5.2.14-18
Version Table:
*** 5.2.14-18 0
500 http://http.us.debian.org sarge/main Packages
100 /var/lib/dpkg/status
It works fine here. Two things:
Are you *sure* that the control characters have been entered correctly?
It is not '^' followed by '['. It must be the single charactor '^['.
Is your profile being sourced correctly? I have to do this (and only
this) in ~/.profile:
ENV=$HOME/.kshrc; export ENV
and then add whatever to ~/.kshrc. Try a blank .kshrc except for
setting PS1 (to make sure there are no syntax errors, etc). I use the
same .profile and .kshrc file on Debian Sarge, Ubuntu Dapper, OpenBSD
and FreeBSD with no problems.
Jamie Strandboge
--
Anemone Computing
http://www.anemonecomputing.com/
Reply to: