The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: arnold@skeeve.com
To: tuhs@tuhs.org, dave@horsfall.org
Subject: [TUHS] Re: shell escapes in utilities
Date: Tue, 01 Aug 2023 14:40:06 -0600	[thread overview]
Message-ID: <202308012040.371Ke6To027489@freefriends.org> (raw)
In-Reply-To: <alpine.BSF.2.21.9999.2308020626150.6040@aneurin.horsfall.org>

Dave Horsfall <dave@horsfall.org> wrote:

> Not quite a Shell escape but possibly just as dangerous: EX/VI had/has the 
> ability to embed EX commands within a file to be run when opened e.g. "se 
> ts=4 sw=4" etc; no doubt EMACS has the same "feature".
>
> It would also recognise the EXINIT environment variable.
>
> -- Dave

These are called "modelines".  In modern vim they have to be in the
first 4 or last 4 lines of a file (or so) and vim is careful about
what it will run from a modeline.

I *think* other vi versions have an option to enable modelines in
the .exrc file, which is off by default, but I no longer remember
the details.

Arnold

  reply	other threads:[~2023-08-01 20:40 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-01  5:47 [TUHS] " ron minnich
2023-08-01 11:38 ` [TUHS] " Leah Neukirchen
2023-08-01 12:31   ` G. Branden Robinson
2023-08-01 20:33   ` Dave Horsfall
2023-08-01 20:40     ` arnold [this message]
2023-08-01 14:29 ` Skip Tavakkolian
2023-08-01 15:30   ` ron minnich
2023-08-01 18:43     ` Ron Natalie
2023-08-01 18:55       ` Niklas Karlsson
2023-08-01 20:48         ` Steffen Nurpmeso
2023-08-01 21:11           ` Ron Natalie
2023-08-01 21:52             ` Steffen Nurpmeso
2023-08-01 21:13           ` Niklas Karlsson
2023-08-01 21:19         ` Dave Horsfall
2023-08-02  3:01         ` Grant Taylor via TUHS
2023-08-02  3:42           ` Niklas Karlsson
2023-08-02  2:59       ` Grant Taylor via TUHS
2023-08-02 10:49         ` Rich Salz
2023-08-02 14:49           ` Grant Taylor via TUHS
2023-08-02 14:20         ` Clem Cole
2023-09-19 16:56     ` Ori Bernstein
2023-09-19 17:04       ` ron minnich
2023-08-01 15:36 ` Phil Budne
2023-08-01 15:37 ` Clem Cole
2023-08-01 15:37 ` Grant Taylor via TUHS

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202308012040.371Ke6To027489@freefriends.org \
    --to=arnold@skeeve.com \
    --cc=dave@horsfall.org \
    --cc=tuhs@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).