lvw@rama.UUCP (Lyndon VanWagner) (04/11/91)
I'm experiencing a problem with vi in my environment. Lately, I've been getting the following message when trying to edit or read a file, using the tilde character (~) to reference files keyed off a home directory: Too many file names Does any one have a suggestion as to what may be causeing this? No one else here at work seem to be experiencing the same problem, so its not with the global environment. And I can't seem to find the message documented anywhere. -- ----------------------------------------------------------------------------- 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. -----------------------------------------------------------------------------
eggert@twinsun.com (Paul Eggert) (04/13/91)
lvw@rama.UUCP (Lyndon VanWagner) writes: >Lately, I've been getting the following message when trying to >edit or read a file, using the tilde character (~) ... > Too many file names Your ~/.cshrc outputs something. Make it stop.
lvw@rama.UUCP (Lyndon VanWagner) (04/15/91)
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. -----------------------------------------------------------------------------