Subject: Re: aliasing the newline-/return-char
To: NetBSD netbsd-users mailing list <netbsd-users@netbsd.org>
From: Martin Ammermueller <martin81@bnro.de>
List: netbsd-users
Date: 04/23/2001 17:45:23
Julian Coleman wrote:
> Martin Ammermueller wrote:
> > I've started to use the (pd)ksh this weekend
> > and I wonder if it's possible to alias
> > the ^M (Return|Newline)-character?
> > 
> > Background: I want to coloring the command-line
> > and the programm-output in a different color...
> 
> Can you not set $PS1 to something to achieve the same affect?  Assuming an
> xterm/vt100, you could do :
> 
> 	_hostname=`hostname`
> 	_user=`whoami`
> 	export PS1="^[[1m$_hostname:$_user $^[[m "
> 
> in your $HOME/.profile to get the prompt in bold.  The "^[" sequence is the
> escape character - you can enter this with <ctrl-V>, then <escape>.

Not exactly that what I want. I want the _whole_ commandline in
a different color (with the typed commands).
The only way I can think of to do this, is aliasing ^M
to something like "echo ^[[37m ^M" to set the color
back to white.


snafu
Martin
-- 
My mind works like lightning.
One brilliant flash and it's gone.

        -- someone on /.