xterm supports both:
  1. xterm -e command with separate arguments
  2. xterm -e 'command line'

It appears to do this by first trying:
  a. execvp(argv[0], argv)
then if there is a single argument:
  b. execl(shell, basename(shell), '-c', argv[0], NULL)
else
  c. execl(shell, basename(shell), NULL)
But I think (c) isn't really important.

gnome-terminal -e behaves like (b) and gnome-terminal -x behaves like
(a).  I think that the wrapper should translate -e to -e only where
there is exactly one argument following and 'which' cannot find a
command by that name; otherwise it should translate it to -x.

Ben.

-- 
Ben Hutchings
Nothing is ever a complete failure; it can always serve as a bad example.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to