[2989] in Athena Bugs

home help back first fref pref prev next nref lref last post

[Dave Whitney A junior (well, a senior) in Computer Science at MIT: prompt...]

daemon@ATHENA.MIT.EDU (probe@ATHENA.MIT.EDU)
Thu Aug 24 20:51:36 1989

From: <probe@ATHENA.MIT.EDU>
Date: Thu, 24 Aug 89 20:51:22 -0400
To: bugs@ATHENA.MIT.EDU
Reply-To: Richard Basch   <probe@ATHENA.MIT.EDU>



------- Forwarded Message

To: probe@ATHENA.MIT.EDU
Subject: prompt...
Date: Thu, 24 Aug 89 17:39:08 EDT
From: Dave Whitney	A junior (well, a senior) in Computer Science at MIT <dcw@ATHENA.MIT.EDU>


In my last message, I suggested something which I now see isn't a good
idea. How about this instead?

if ($?prompt) then              # For interactive shells only (i.e., NOT rsh):
    stty dec                    #   Use DEC-style control characters
    set user=`ps -u | awk '{print $1}'`
    set user=`echo $user | awk '{print $2}'`
    set prompt="$USER@`hostname`% "  # make a unique prompt for each user
    set history = 20            #   Number of commands saved as history
    set cdpath = (~)            #   Path to search for directory changes
    set interactive             #   Provide shell variable for compatability
endif

This makes my prompt be:

dcw@<machine_name>%

Which is usually just 'dcw@m11-111-1% '

You'll note the funkiness with setting user - I did this on the Sun at my
UROP. It insures that anyone who might run 'su' has his prompt changed to
'root@<machine>% '.

Just random suggestions...

	Dave

------- End Forwarded Message

home help back first fref pref prev next nref lref last post