#3532: Use $SHELL when running mailcap-related commands
-------------------------+--------------------------------------------------
 Reporter:  vinc17       |       Owner:  mutt-dev
     Type:  enhancement  |      Status:  new     
 Priority:  major        |   Milestone:          
Component:  mutt         |     Version:          
 Keywords:               |  
-------------------------+--------------------------------------------------

Comment(by vinc17):

 Replying to [comment:1 m-a]:
 > I contend that mutt SHOULD USE /bin/sh unconditionally so that mailcap
 > entries have predictable behaviour.  This is standard behaviour on
 > UNIX-like systems, and mutt SHOULD NOT USE the user's interactive shell.

 The fact that the /bin/sh depends on the system (and may even change on a
 system, e.g. on Debian it is a symlink to either bash or dash) makes the
 behavior already not completely predictable. At least allowing the user to
 choose the shell allows him to choose the same shell on various machines.

 The choice could be done via a variable.

 > While use of $SHELL may aid scripting, users can trivially write a
 > wrapper such as:
 >
 > #!/bin/sh
 > exec /path/to/zsh /my/zsh/script "$@"

 If Mutt doesn't allow the user to execute the wrapper, this is not
 possible.

 > Using the login/interactive shell for scripting will fail in awkward
 > ways and generate tons of bug reports.

 Well, I more or less agree. I suggested it only for consistency with other
 software. I don't think there would be many problems in practice, though
 (most users having some sh-compatible shell as their login shell).

-- 
Ticket URL: <http://dev.mutt.org/trac/ticket/3532#comment:2>
Mutt <http://www.mutt.org/>
The Mutt mail user agent

Reply via email to