[net.bugs.4bsd] vi bug, or how to set up .cshrc

gnu@sun.uucp (John Gilmore) (08/09/85)

KEITH F. PILOTTI of TeleSoft said:
>     Under 4.2BSD, the best solution seems to be the following:
> 
>         set path = ( . ~ ~/bin ~/frammis /usr/ucb /usr/bin /bin )
>         if ( ! $?prompt ) exit
>         ...
>         <rest of your (interactive) run commands>

Actually, the "set path" is not needed.  Path is put into the
environment variable PATH, which persists across all processes you
create.  Set it in your .login .

Also note that it's often a bad idea to put "." ahead of the standard
directories in your path.  This leaves you open to trojan horses
that will run when you type "cat" or "ls" as you look around.

The "if (!x) exit" versus "if (x) indented stuff for 30 lines", which
was the real point of Keith's message, is good stuff.

kimcm@diku.UUCP (Kim Christian Madsen) (08/11/85)

In article <2585@sun.uucp> gnu@sun.uucp (John Gilmore) writes:
>KEITH F. PILOTTI of TeleSoft said:
>>     Under 4.2BSD, the best solution seems to be the following:
>> 
>>         set path = ( . ~ ~/bin ~/frammis /usr/ucb /usr/bin /bin )
>>         if ( ! $?prompt ) exit
>>         ...
>>         <rest of your (interactive) run commands>
>
>Actually, the "set path" is not needed.  Path is put into the
>environment variable PATH, which persists across all processes you
>create.  Set it in your .login .

Well, I agree that it should be superflous to set the path other places
than in your login. But if you are about to pipe data through a remote shell
(rsh) the path variable will be needed in your .cshrc or you will have to
give full pathname on the remote system.

					Regards
					Kim Chr. Madsen
				a.k.a.	kimcm@diku.uucp

pilotti@telesoft.UUCP (Keith Pilotti @shine) (08/18/85)

<2585@sun.uucp>
Sender: 
Reply-To: pilotti@telesoft.UUCP (Keith Pilotti @shine)
Followup-To: 
Distribution: 
Organization: TeleSoft, San Diego, CA
Keywords: 

In article <2585@sun.uucp> gnu@sun.uucp (John Gilmore) writes: 
>KEITH F. PILOTTI of TeleSoft said: 
>> 
>>         set path = ( . ~ ~/bin ~/frammis /usr/ucb /usr/bin /bin )
>>         if ( ! $?prompt ) exit
>
>Actually, the "set path" is not needed.  Path is put into the
>environment variable PATH, which persists across all processes you
>create.  Set it in your .login . 
    
    This is true, except for remote commands.  4.2BSD `rsh'
    does not propagate PATH across to the remote machine.  The remote
    process gets a system default PATH modified by ".cshrc". 

>Also note that it's often a bad idea to put "." ahead of the standard
>directories in your path.  This leaves you open to trojan horses
>that will run when you type "cat" or "ls" as you look around. 

    I like suprises, and personally consider finding trojan horses a
    feature :-), however I agree that the *Super-User*'s path should
    NOT contain "." !  The above ".cshrc" example, without the ".", 
    installed in /.cshrc is a good way to guarantee this. 

    /+\ Keith P
    ________________________________________________________

          <pilotti@telesoft.UUCP> <pilotti@UCSD.ARPA>
          ...{decvax,ucbvax}!sdcsvax!telesoft!pilotti