ob-shell: honor the specified shell for :session
commit6d15cd3b89cb665357ef1f6e62c8687a10b911b4
authorAchim Gratz <Stromeko@Stromeko.DE>
Sun, 22 Jun 2014 09:16:41 +0000 (22 11:16 +0200)
committerAchim Gratz <Stromeko@Stromeko.DE>
Mon, 23 Jun 2014 18:53:22 +0000 (23 20:53 +0200)
treedd4703b60aab922385866496f8f87c8033d7d190
parent2685f31a506e368aef86edbb71a5ae15438610ef
ob-shell: honor the specified shell for :session

* lisp/ob-shell.el: Remove defcustom `org-babel-sh-command' and
  replace with `shell-file-name' throughout.
  (org-babel-variable-assignments:sh): Make check for bash work in more
  cases.

The original code and the patched version rely on the shell being
available via PATH.  Instead the shell name should be mapped to the
appropriate executable via an alist and invoked via an absolute
filename.  For security reasons the permissible shells should probably
be taken from /etc/shells or equivalent by default.  Instead of
checking for bash, the same or another alist could provide the
information of whether or not the shell supports arrays (which indeed
were introduced by ksh originally).
lisp/ob-shell.el