Path: utzoo!mnetor!uunet!mcvax!enea!kuling!irf From: irf@kuling.UUCP (Bo Thide) Newsgroups: comp.editors Subject: Re: Novice vi(1) script with on-line help Message-ID: <617@kuling.UUCP> Date: 21 Jan 88 17:01:14 GMT References: <607@kuling.UUCP> <449@taux01.UUCP> Reply-To: irf@kuling.UUCP (Bo Thide) Organization: Dept. of Computer Systems, Uppsala University, Sweden Lines: 49 In article <449@taux01.UUCP> amos%taux01@nsc.com (Amos Shapir) writes: >WARNING! The referenced article contains something that looks like a shell >archive but isn't - it contains compiling instructions, binary data, and WRONG! It *is* a shell archive. My version of (PD) 'shar' is kind enough to supply a small program for unpacking non-printing ("non-ASCII") characters as a courtesy to all of you who haven't got 'btoa', 'uudecode' etc. Of course a large set of 'vi' macros must contain non-printing characters (Ctrl-M is one of them!!!). As is clear to see, this unpacking program is put in /tmp and after it has done its job it is 'rm':ed. VERY SAFE and VERY STANDARD. In fact, I earlier posted a version where I had run the 'nvi' files through 'cat -tv' (in order to change Ctrl-M to "^" followed by "M" etc). Some of you didn't like that so, on demand, I prepared the 'shar' version you're criticizing... >*absolute* pathnames! If it works at all on your system, it might destroy >something important. You think absolute pathnames is a bad habit. I think relative pathnames is a bad habit in cases like this where the script has to have absolute pathnames. The alternative would be to change the contents of the files before they are unpacked. This is much less obvious than just inspect the shell archive where it is VERY CLEARLY STATED that absolute pathnames are used. Unless the files with the absolute paths and the names exist on your system (extremely unlikely unless you have a version of my 'nvi' or 'lvi' in which case the 'nvi' shar we're discussing really SHOULD overwrite old files!) you cannot overwrite anything by running 'sh nvi.shar' -- not even if you are a superuser! >Though I think this was done in good will, and this is not a Trojan Horse, TRUE! >be *very* careful when unpacking - better edit, not execute it. If you are in doubt whether some of your files will be in jeopardy, change the file names before unpacking 'lvi.shar'. I always do that. I thought I'm not the only one who does that. But then you have to edit the unpcaked files! I guarantee that 'lvi' contains only standard 'vi' commands. I cannot guarantee, though, that 'lvi' will run on your system. I doesn't on 4.2 BSD on VAX since the 'vi' there is severly bug-infested. It runs perfectly under HP-UX. >>> Bo Thide', Swedish Institute of Space Physics, S-755 90 Uppsala, Sweden <<< Phone (+46) 18-300020. Telex: 76036 (IRFUPP S). UUCP: ..enea!kuling!irfu!bt -- >>> Bo Thide', Swedish Institute of Space Physics, S-755 90 Uppsala, Sweden <<< Phone (+46) 18-300020. Telex: 76036 (IRFUPP S). UUCP: ..enea!kuling!irfu!bt