Path: utzoo!utgpu!cunews!software.mitel.com!sharman!sharman From: sharman@Software.Mitel.COM (Richard Sharman) Newsgroups: comp.unix.sysv386 Subject: Re: Fortune Cookie Prompt Message-ID: Date: 17 Jun 91 02:37:48 GMT References: <1991Jun10.003223.3384@weyrich.UUCP> Sender: sharman@Software.Mitel.COM Organization: /home/tools/sharman/.organization Lines: 25 In-reply-to: orville@weyrich.UUCP's message of 10 Jun 91 00:32:23 GMT In article <1991Jun10.003223.3384@weyrich.UUCP> orville@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 %