Fortune Cookie Prompt
Richard Sharman
sharman at Software.Mitel.COM
Mon Jun 17 12:37:48 AEST 1991
In article <1991Jun10.003223.3384 at weyrich.UUCP> orville at weyrich.UUCP (Orville R. Weyrich) writes:
I would like to set up a fortune-cookie type of program which displays
a new randomly selected message each time my shell prompts me. It seems
that I saw some description in a OLD FAQ list about how to include the
"working directory" in the prompt, but I have lost that FAQ list.
If you can get hold of the tcsh shell, the alias precmd can be set a
command which gets run before the prompt. Beware, though, if you set
it to something erroneous you may have to hangup to recover.
% alias precmd /usr/games/fortune
"My weight is perfect for my height -- which varies"
% pwd
/auto/home/tools/sharman
The human mind treats a new idea the way the body treats a strange
protein -- it rejects it.
-- P. Medawar
% date
Sun Jun 16 22:28:17 EDT 1991
Washington [D.C.] is a city of Southern efficiency and Northern charm.
-- John F. Kennedy
%
More information about the Comp.unix.sysv386
mailing list