Trojan horse FIX for Rnmail and Pnews

David Elliott dce at mips.COM
Wed Dec 7 00:33:21 AEST 1988


In article <6798 at rosevax.Rosemount.COM> merlyn at ernie.rosemount.com writes:
>! 	${VISUAL-${EDITOR-$defeditor}} '+set nomodeline' $tmpart $oldart

Did you test this with emacs?  ed?  Other editors that may not understand
'+set nomodeline'?

Isn't the problem that vi/ex need to be executed specially?  In that
case, a proper way to handle this would be

	TEXTED=${VISUAL-${EDITOR-$defeditor}}
	case "$TEXTED" in
		vi|*/vi|ex|*/ex)
			"$TEXTED" '+set nomodeline' $tmpart $oldart
			;;
		*)
			"$TEXTED" $tmpart $oldart
			;;
	esac

Disclaimers: No, I didn't test this code.  Yes, there may be other
	names for ex/vi I didn't handle.

-- 
David Elliott		dce at mips.com  or  {ames,prls,pyramid,decwrl}!mips!dce
"Did you see his eyes?  Did you see his crazy eyes?" -- Iggy (who else?)



More information about the Comp.unix.wizards mailing list