<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto">On 28 Nov 2019, at 22:00, Tobias Girstmair wrote:</p>

</div>
<div style="white-space:normal"><blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px"><p dir="auto">On Fri, Nov 29, 2019 at 09:51:42AM +1300, martin f. krafft wrote:</p>
<blockquote style="border-left:2px solid #777; color:#999; margin:0 0 5px; padding-left:5px; border-left-color:#999"><p dir="auto">That's all I have in /usr/bin here ;)</p>
</blockquote><p dir="auto">I've got /usr/bin/i3-sensible-editor and it _does_ eval it (not that i have a strong opinion on this topic):<br>
<br>
   for editor in "$VISUAL" "$EDITOR" nano nvim vim vi emacs pico qe mg jed gedit mcedit gvim; do<br>
        if command -v "$editor" > /dev/null 2>&1; then<br>
            exec "$editor" "$@"<br>
        fi<br>
   done</p>
</blockquote></div>
<div style="white-space:normal">

<p dir="auto">I don’t know what the above is, but that does not use <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">eval</code> and it doesn’t even seem to support arguments as part of the <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">EDITOR</code> variable (as it uses quotes for the variable expansion, so <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">command</code> will see the command with arguments as a single shell word and fail).</p>

<p dir="auto"><code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">crontab</code> also does not support arguments as part of the <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">EDITOR</code> variable, but everything else that I am aware of does.</p>

<p dir="auto">I have not seen anything use <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">eval</code> and I think it’s a bad idea because it’s not a specification, it’s just “run it as a shell line” which can have different meaning depending on the shell.</p>

<p dir="auto">Definitely the proper solution is to have <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">EDITOR</code> point to a shell script rather than try to treat the <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">EDTIOR</code> variable as an inline shell script.</p>
</div>
</div>
</body>
</html>