Prompt changing on the fly with cutsie sayings

wyle at ethz.UUCP wyle at ethz.UUCP
Sat Feb 7 05:29:16 AEST 1987


What I really meant was NOT to add history, directory info, but
to have the machine say:

Yes, honey?_

and other such nothings after each command which I type.  I use csh,
so it has to work in csh.  My current solution is as follows:

In my .cshrc file I have the following commands:

. . .

alias   promptchange 'set prompt="`hostname`[$cwd:t]< \! > `/usr/wyle/work/prompt/sp`"'

alias   h       'history \!* | head -199 | more; promptchange'
alias         'clear; promptchange'
alias   t       'more \!*; promptchange'
alias   ls      'ls -F ; promptchange'
alias ls   'ls \!* ; promptchange'
alias vi   'vi \!* ; promptchange'
alias rm   'rm \!* ; promptchange'
alias make 'make \!* ; promptchange'
alias cp   'cp \!*  ; promptchange'

...etc.

In other words, I alias most of my commonly used commands to invoke the
prompt change macro which sets my prompt to be:

<host> <directory> <history number> <cutsie saying>

The C program just selects a random prompt from a file, with the seed of
the random number generator the milliseconds from the time of day.

I have a rather large file of cutsie sayings to which friends add ideas
periodically.

If anyone wants the c source (20 lines) I'll post it.  If anyone wants
the list of cutsie prompts, I'll post them in parts.

Please:  If anyone has a better, cleaner solution, let me know!

--
Mitch wyle 	wyle at ethz.uucp

-- 
                      M i t c h e l l     F     W y l e

    EEEEE TTTTTT H   H  Eidgenoessische      | wyle%ifi.ethz.chunet at csnet-relay
   E       T    H   H  Technische Hochschule | wyle at ethz.uucp
  EEEE    T    HHHHH  Zuerich                | ...!cernvax!ethz!wyle
 E       T    H   H  Institut fuer Informatik| Telephone: 011 41 1 256 5235 
EEEEE   T    H   H  8092 Zuerich, Switzerland| "Ignore alien orders"



More information about the Comp.unix.wizards mailing list