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

: /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)
#+BEGIN_SRC zsh :session z1 :shcmd zsh
echo $HOME $0

But it still uses bash.

  • 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. – 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.