Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!mips!dimacs.rutgers.edu!rutgers!njin!uupsi!rama!lvw From: lvw@rama.UUCP (Lyndon VanWagner) Newsgroups: comp.unix.questions Subject: Re: "too many file names" in vi Keywords: vi,problems,.cshrc Message-ID: <10950@rama.UUCP> Date: 15 Apr 91 16:58:07 GMT Distribution: na Organization: Scientific Calculations, Fishers, NY Lines: 40 Just wanted to thank Raymond Chen for his assistance in my vi/environment problem. Turns out that I had placed an "echo" in my .cshrc, and this stopped vi and ex from reading/editing other files using the C-shell tilde (~) reference. + + When vi sees a tilde or a * or anything else strange, it calls + your shell to perform the expansion; typically, it just does a + + /bin/csh -c echo whatever-you-typed + + (more or less) and then captures the output. + + But if your .cshrc produces output, then vi gets confused when + it sees other gunk mixed in with the expanded filename. + + Moral of the story: + + Put the line + + if ($?prompt == 0) exit + + at the top of your .cshrc so that nothing is done if a noninteractive csh + is being run. + Thanks again. -- ----------------------------------------------------------------------------- Lyndon C. VanWagner Internet:lvw@rama.sc.harris.com Software Engineer -or- rama!lvw@uu.psi.com Framework Development Group UUCP: ...!{uupsi,tropix}!rama!lvw Harris Corporation PHONE: (716) 924-9303 ext. 226 Scientific Calculations Division, Fishers, NY 14453 ----------------------------------------------------------------------------- Cornfield's Law (paraphrased): Before anything can change, everyone must agree. By the time that happens its a different problem. -----------------------------------------------------------------------------