Xref: utzoo comp.unix.misc:855 comp.windows.misc:1750 Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!samsung!usc!rutgers!njin!princeton!phoenix.Princeton.EDU!subbarao From: subbarao@phoenix.Princeton.EDU (Kartik Subbarao) Newsgroups: comp.unix.misc,comp.windows.misc Subject: Re: prompt question Message-ID: <5620@idunno.Princeton.EDU> Date: 23 Jan 91 14:31:09 GMT References: <1991Jan23.083259.16296@daimi.aau.dk> Sender: news@idunno.Princeton.EDU Followup-To: comp.unix.misc Lines: 40 In article <1991Jan23.083259.16296@daimi.aau.dk> pilgrim@daimi.aau.dk (Jakob G}rdsted) writes: >I have a problem with the prompt. > >I want a little script to be executed, every time >I press return (I want the prompt to change). > >Is this possible with a shell-script, or do >I have to write a C-program, which I know >very little about. The tcsh and zsh shells have exactly what you want to do built in. If you > alias precmd shellscript, # In tcsh, or Z> function precmd {shellscript} # in zsh it will execute 'shellscript' right before it prints every prompt. You can get tcsh from many sites, (I think the 'official' one these days is tesla.ee.cornell.edu). You can get zsh from Princeton.EDU. -Kartik > >Please anwers this question. > > Thanks in advance. Pilgrim -- internet# find . -name core -exec cat {} \; |& tee /dev/tty* subbarao@{phoenix or gauguin}.Princeton.EDU -|Internet kartik@silvertone.Princeton.EDU (NeXT mail) -| SUBBARAO@PUCC.BITNET - Bitnet