vi bug(feature?)

Keith Pilotti @shine pilotti at telesoft.UUCP
Wed Aug 7 10:14:09 AEST 1985


In article <190 at ittral.UUCP> malloy at ittral.UUCP (William P. Malloy) writes:
>> From: mike at 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!
        ...
        <rest of your (interactive) run commands>

    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 at UCSD



More information about the Comp.bugs.4bsd.ucb-fixes mailing list