pag@hao.UUCP (Peter Gross) (04/24/84)
I can see both the utility and security problems with the above. An easy way around the latter is to only do it when the .exrc file is owned by the invoker of ex/vi (maybe that's what's done now). --peter gross hao!pag
mjl@ritcv.UUCP (Mike Lutz) (04/26/84)
Adding suffix dependent setup to vi is straight forward. I have a shell script in my own 'bin' that uses the suffix to select initialization commands that are then grafted onto my generic EXINIT environment variable. I even set have a function key set up to change modes in case the suffix guess is wrong. I think this is in general preferable to (and less annoying than) embedding the commands in the source file itself. Overhead for all this is about 1 CPU second on an 11/780 -- hardly noticeable unless the load average zooms out of sight. If I really wanted, I guess I could hard code it all in C and get the overhead down even further, but it's not been worth the bother up to now. Mike Lutz -- Mike Lutz Rochester Institute of Technology, Rochester NY UUCP: {allegra,seismo}!rochester!ritcv!mjl ARPA: ritcv!mjl@Rochester.ARPA