[net.misc] Funny prompts

colonel@gloria.UUCP (George Sicherman) (10/07/84)

["In other words, if I turn left, right is behind me.  Is that correct?"]

Around here we see a lot of prompts like

	Yes, Master?
	May I help you?
	NOW what??

Nobody pays much attention to them....
-- 
Col. G. L. Sicherman
...seismo!rochester!rocksanne!rocksvax!sunybcs!gloria!colonel

ag5@pucc-i (Henry C. Mensch) (10/09/84)

<<Yeah?>>

	My favorite (seen on several student logins):

	'Buzz off!'

--------------------------------------------------------------------
Henry C. Mensch                 | Purdue University Computing Center
{decvax|ucbvax|sequent|icalqa|inuxc|uiucdcs|ihnp4}!pur-ee!pucc-i!ag5
--------------------------------------------------------------------
            " . . You'd better smile when they watch you,
                  smile like you're in control. . ."
                                 -- *Smile*, Was (Not Was)

mff@wuphys.UUCP (Space Goat) (10/12/84)

	Speaking of funny prompts, I have always wanted to write a shell script
	which would change the prompt every so often, while I'm logged on. The
	problem is that I can run a background process to change the shell variable
	PROMPT (I'm running csh), but the parent process (the shell that I'm
	talking to) doesn't know anything about that variable. Anyone have any
	ideas? 






						Mark F. Flynn
						Washington University
						St. Louis, MO  63130
						ihnp4!wuphys!mff

------------------------------------------------------------------------------

"There is no dark side of the moon, really.
 Matter of fact, it's all dark."

				P. Floyd

cuccia@ucbvax.ARPA (Nick Cuccia) (10/13/84)

Some of us (UCB) here do really horrible things with our prompts.
I have, in my .cshrc, the following:

	alias	promp	`set prompt=MachineName ($cwd) <\! > `
	alias	cd	'cd \!*; promp'

and in my .login:

	promp

This prints the full path, from the root, on UN*X systems.
Some machines may not have the cwd variable, so you may need
to add 'alias	setcwd set cwd=`pwd`' to your .cshrc and
insert setcwd ahead of promp in the cd alias above.

On average my prompt length is about 25 chars, with its peak at close
to  80.

Have fun...

--Nick Cuccia
--ucbvax!cuccia

bobr@zeus.UUCP (Robert Reed) (10/17/84)

I have something similar to the prompt that includes cwd, but I couldn't
stand the whole rooted path, so I have the following stuff:

alias setprompt 'set prompt="^[[1;7m`hostname`^[[0m \\!:`echo $cwd | sed -f ~/.home.sed` % "'
alias '>' 'pushd \!* && setprompt'
alias '<' 'popd && setprompt'
alias cd 'cd \!* && setprompt'

where .home.sed is

s:^/usr1/bobr/::
s:^/usr1/bobr$::
s:^/usr./:~:
s:^/usr/spool/news:~news:
s:^/usr/lib/local/emacs:~emacs:

this has the effect of reducing any path below my home directory to just
that partial path, and since all our of our user directories are of the form
'/usr?/<name>', chdir to another user's home directory gives ~user/whatever.

There's also some vt100 garbage so that the hostname is reversed and the
resulting string is something like:

zeus 17:Mail/inbox % 
-- 
Robert Reed, Tektronix Logic Design Systems Division, tektronix!teklds!bobr

adams@plx.UUCP (Robert Adams) (10/18/84)

Of funny prompts, I've always liked:

		Your wish is my control statement:

-- 

   ..!decvax!decwrl!sun!plx!adams             -- Robert Adams

debray@sbcs.UUCP (Saumya Debray) (10/20/84)

Try getting into joe_newuser's .cshrc and adding

		set prompt='login: '
		alias joe_newuser logout

The subsequent thrashing behaviour can be pretty funny!
-- 
Saumya Debray, 	SUNY at Stony Brook

	uucp:
	    {cbosgd, decvax, ihnp4, mcvax, cmcl2}!philabs \
		      {amd, akgua, decwrl, utzoo}!allegra  > !sbcs!debray
			      {tektronix, metheus}!ogcvax /
	CSNet: debray%suny-sbcs@CSNet-Relay

sjf@foxvax1.UUCP (S.J. Foley ) (10/23/84)

I at one time had this prompt |)-> -> -> ->.  The arrows were followed by 
by several backspaces, which were then followed by several pairs of foward
spaces and back spaces to give a delay effect. Finally the 4 more arrows 
followed.  This gave the illusion of an arrow being shot across the screen.
I kept this prompt until I could stand no more ridicule from my co-workers.


					-sf-   
-- 
adios
	-sf-

richard@sequent.UUCP (10/26/84)

>>  Some of us (UCB) here do really horrible things with our prompts.
>>  I have, in my .cshrc, the following:
>>  
>>  	alias	promp	`set prompt=MachineName ($cwd) <\! > `
>>  	alias	cd	'cd \!*; promp'
>>  
>>  and in my .login:
>>  
>>  	promp
>>  
>>  This prints the full path, from the root, on UN*X systems.
>>  Some machines may not have the cwd variable, so you may need
>>  to add 'alias	setcwd set cwd=`pwd`' to your .cshrc and
>>  insert setcwd ahead of promp in the cd alias above.
>>  
>>  On average my prompt length is about 25 chars, with its peak at close
>>  to  80.

Oh, you can have more fun than that.  I use rlogin for concurrent logins
on up to three machines from my home machine.  So I don't get too
confused, I want the machine name and path displayed all the time.
I also use the csh history functions, so I want the history number
displayed with each prompt.  SO:

setenv HOST `hostname`
set prompt="$HOST(\!): <to stat>$cwd<back from stat>"
alias cd  'chdir \!* ; set prompt="$HOST(\!): <to stat>$cwd<back from stat>"'
alias pd  'pushd \!* ; set prompt="$HOST(\!): <to stat>$cwd<back from stat>"'
alias po  'popd  \!* ; set prompt="$HOST(\!): <to stat>$cwd<back from stat>"'

The <to stat> is the escape sequence necc to start writing in the
status line, and the <back from stat> returns to the current line.
Note: If you only have one machine, you only need to print out the
stat line when you chdir, pushd or popd.  But popping back and forth
between three background rlogins and my home machine, whenever I get
a new prompt, voila.

It takes a little longer to cd, but it was fun while my prompt slowly
developed.  Now I'm on a wyse75; the bottom status line runs a niced
sysline, while the top status line has my current working directory.

Happy hacking!
							...!sequent!richard

avolio@grendel.UUCP (Frederick M. Avolio) (10/26/84)

You can achieve similar results without the editing (sediting?) using
the command "dirs" to get the cwd.
-- 
Fred Avolio, DEC -- U{LTR,N}IX Support
301/731-4100 x4227
UUCP:  {seismo,decvax}!grendel!avolio
ARPA:  grendel!avolio@seismo.ARPA

kaufman@uiucdcs.UUCP (10/31/84)

After many hours of research :-) and inspiration from your prompts, I have come
up with this one:

set   prompt='[======]----------------** * * * * 
* * * * * * * * * * 
*        \!  '

Try it, you'll like it.

Ken Kaufman (uiucdcs!kaufman)
"Lord knows, we need more statesmen."

kaufman@uiucdcs.UUCP (10/31/84)

Oops,  the control characters didn't come through.  Try again.

set   prompt='[======]----------------*^H^H* ^H^H^H* ^H^H^H* ^H^H^H* ^H^H^H* ^H
^H^H* ^H^H^H* ^H^H^H* ^H^H^H* ^H^H^H* ^H^H^H* ^H^H^H* ^H^H^H* ^H^H^H* ^H^H^H*
^H^H^H* ^H^H ^H^H ^H^H ^H^H ^H^H ^H^H^H^H^H  \!  '

Ken Kaufman (uiucdcs!kaufman)
"Lord knows, we need more statesmen".

rwl@uvacs.UUCP (Ray Lubinsky) (11/04/84)

> After many hours of research :-) and inspiration from your prompts, I have come
> up with this one:
> 
> set   prompt='[======]----------------** * * * * 
> * * * * * * * * * * 
> *        \!  '
> 
> Try it, you'll like it.
> 
> Ken Kaufman (uiucdcs!kaufman)
> "Lord knows, we need more statesmen."

------------------------------------------------------------------------------

<*** FLAME ON ***>

I was wondering what was so funny about this prompt until I started editing
this flame and saw what you _intended_ send.  What I received on my terminal
was:

set   prompt='[======]----------*
*
  \!  '

which didn't make any sense so I tried it out.  Definitely a dud.  Then when
your message came up in the editor I see this:

> set   prompt='[======]----------------*^H^H* ^H^H^H* ^H^H^H* ^H^H^H* ^H^H^H* ^H
> ^H^H* ^H^H^H* ^H^H^H* ^H^H^H* ^H^H^H* ^H^H^H* ^H^H^H* ^H^H^H* ^H^H^H* ^H^H^H* 
> ^H^H^H* ^H^H ^H^H ^H^H ^H^H ^H^H ^H^H^H^H^H  \!  '

where each ^H is a backspace.  Maybe you still use hard-copy terminals where
ever _you_ are but the rest of us have moved up to terminals and each of those
literal backspaces where invisible!

<*** FLAME OFF ***>

Since we're on the topic of prompts (funny or otherwise), I was wondering if
any C-shell hackers know of a way to make the shell execute an arbitrary
program each time the prompt comes up.  Right now I use a prompt that displays
the current command number at the top right of the screen in reverse video,
then places the usual '% ' prompt at the lower left hand corner (this is on an
adm5 dumb terminal).

I know about the standard method of aliasing commands (like cd and pushd/popd)
to change the prompt, but I'd like to find a way to set the prompt so that
'date' is executed each time I get a prompt in the login shell.  Any wizards
out there that can take this one on?

------------------------------------------------------------------------------

Ray Lubinsky		     University of Virginia, Dept. of Computer Science
			     uucp: decvax!mcnc!ncsu!uvacs!rwl