Path: utzoo!attcan!uunet!lll-winken!lll-tis!mordor!joyce!ames!think!bloom-beacon!mit-eddie!bbn!bbn.com!mesard From: mesard@bbn.com (Wayne Mesard) Newsgroups: comp.unix.wizards Subject: Re: Make & .cshrc Message-ID: <29592@bbn.COM> Date: 12 Sep 88 20:56:39 GMT References: <21621@tut.cis.ohio-state.edu> Sender: news@bbn.COM Lines: 22 From article <21621@tut.cis.ohio-state.edu>, by karl@triceratops.cis.ohio-state.edu (Karl Kleinpaste): > You should set prompt > iff there already exists a prompt, i.e., > if ($?prompt) then > alias cd 'chdir \!*; set prompt="$cwd> "' > endif > > Otherwise, you're unconditionally introducing a prompt into a context > where none should exist. (And didn't exist, since csh knew whether it > was running interactively from a tty, and sets prompt only if so.) Or more generally, put the following line at the top of your .cshrc file: if ($?prompt == 0) exit Since most users only need the stuff in .cshrc when they'll be typing to the shell. This speeds up programs which might invoke csh (such as make(1)) as well as dain bramaged shell C-shell scripts which don't have the -f option in their first line. -- void *Wayne_Mesard(); MESARD@BBN.COM BBN, Cambridge, MA