1

#+BEGIN_SRC zsh :session z1
echo $HOME $0
#+END_SRC

#+RESULTS:
: /Users/evar /bin/bash

I am thinking of trying the workaround outlined here, but shouldn't this work out of the box?

Update: I couldn't get that workaround to work. I tried:

(require 'ob-shell)
(defadvice org-babel-sh-evaluate (around set-shell activate)
  "Add header argument :shcmd that determines the shell to be called."
  (let* ((org-babel-sh-command (or (cdr (assoc :shcmd params)) org-babel-sh-command shell-file-name))
         (shell-file-name org-babel-sh-command)
         )
    ad-do-it
    ))
#+BEGIN_SRC zsh :session z1 :shcmd zsh
echo $HOME $0
#+END_SRC

But it still uses bash.

HappyFace
  • 751
  • 4
  • 16
  • There seems to be something wonky with `:session` - try without it and see if that works. If it does, then I'd suggest you send a bug report to the [mailing list](https://orgmode.org/community.html). – NickD Aug 19 '20 at 14:53
  • @NickD Yes, it works without `:session`. I'll send a bug report. Thanks. Have a good day. ^_^ – HappyFace Aug 19 '20 at 15:58

0 Answers0