[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#648271: [debian-policy] 11.8.3 "Packages providing a terminal emulator" says xterm passes -e option straight to exec



There's some mail client that seems to mangle messages that contain words
inside angle brackets.  Apparently Mozilla?  It's doing weird things to
the whitespace when you quote.

Filipus Klutiero <chealer@gmail.com> writes:

> I would simply suggest as a replacement:

>>      Support the command-line option "-e <command>", which creates a
>>      new terminal window and runs the specified simple command.
>>      <command> may be multiple arguments, all of which are part of the
>>      simple command.  All arguments are passed directly to exec,
>>      bypassing the shell.  (xterm's behavior of falling back on using
>>      the shell if -e had a single argument and exec failed is
>>      permissible but not required.)

> (<command> could be replaced by <simple command>, but I think that will
> be clear enough already.)

I'm not sure that simple command is going to be any more intuitive to
people for whom the mention of exec doesn't get it across.  Maybe we
should say something like "...specified simple command, by default not
using the shell"?  I can't tell if your main concern is clarifying that &&
or | or the like don't work, or something else.

>> But that matters for interoperability.  The point of this section is to be
>> able to issue the command:

>>      x-terminal-emulator -e vi 'some file'

>> and know that it works.  If you don't use exec, it won't.

> I don't see why exec would be necessary. As long as the emulator
> supports being given any simple command as its -e option, such commands
> should work.

x-terminal-emulator -e vi 'some file' is required to edit the single file
named 'some file' (with a space), not two files, one named some and one
named file, which is the behavior you get if you pass the command to the
shell by using something like system().

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Reply to: