chiark / gitweb /
mdw-editor: If both VISUAL and EDITOR are set unusually, prefer EDITOR.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 7 Jul 2009 18:18:47 +0000 (19:18 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 7 Jul 2009 18:18:47 +0000 (19:18 +0100)
Previously we did something strange.

mdw-editor

index a58ee95ce9a57975496bd2f9a2bf76bb2a62fa36..8b6e819f343b93b4d90b89eb8d96291d98d5ae0c 100755 (executable)
@@ -6,7 +6,7 @@ editor=${MDW_EDITOR-ed}
 case "$EDITOR,$VISUAL,$TERM" in
   mdw-editor,mdw-editor,dumb) editor=gnuclient;;
   mdw-editor,mdw-editor,*);;
-  *,mdw-editor,*) editor=$EDITOR;;
   mdw-editor,*,*) editor=$VISUAL;;
+  *,*,*) editor=$EDITOR;;
 esac
 exec $editor "$@"