Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site telesoft.UUCP Path: utzoo!linus!philabs!prls!amdimage!amdcad!decwrl!decvax!ittatc!dcdwest!sdcsvax!telesoft!pilotti From: pilotti@telesoft.UUCP (Keith Pilotti @shine) Newsgroups: net.bugs.4bsd Subject: Re: vi bug(feature?) Message-ID: <171@telesoft.UUCP> Date: Tue, 6-Aug-85 20:14:09 EDT Article-I.D.: telesoft.171 Posted: Tue Aug 6 20:14:09 1985 Date-Received: Sun, 11-Aug-85 04:01:49 EDT References: <144@peregrine.UUCP> <190@ittral.UUCP> Reply-To: pilotti@telesoft.UUCP (Keith Pilotti @shine) Distribution: net Organization: TeleSoft, SanDiego CA Lines: 43 Keywords: shell, vi, csh Summary: defeating defeature In article <190@ittral.UUCP> malloy@ittral.UUCP (William P. Malloy) writes: >> From: mike@peregrine.UUCP (Mike Wexler) >> >> My standard shell is the /bin/csh. When I try doing a any command >> with a name that needs to be shell expanded the editor calls the shell, >> but gets confused by the shell prompt and includes that in the file list. >> ... > >Your problem is with C Shell and not with vi. >... Under 4.2BSD, the best solution seems to be the following: %%%%%%%% .cshrc %%%%%%%% set path = ( . ~ ~/bin ~/frammis /usr/ucb /usr/bin /bin ) if ( ! $?prompt ) exit # IF THIS IS A NON-INTERACTIVE SHELL, EXIT IMMEDIATELY! ...This supports command execution finding the commands you expect, and avoids problems (and delays) when issueing shell commands from the editor, as well as in remote commands (via rsh and rcp). If there are other things you desire to be set always, just include them before the "if ... exit", though the fewer there are, the faster shell startup will be. In particular, no output-producing commands (eg. echo) should appear prior to the "if ... exit" line. The deficiency with the previous example is that the C-shell must continue to read the ".cshrc" file to find the "endif" where the above forces it to exit immediately after determining that it is a non-interactive shell. /+\ Keith ________________________________________________________ KEITH F. PILOTTI -- TeleSoft (619) 457-2700 x172 10639 Roselle St, SanDiego, CA 92121 (UUCP) {decvax,ucbvax}!sdcsvax!telesoft!pilotti (ARPA) Pilotti@UCSD