mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-22 07:09:47 +00:00
babel: shell command used by org-babel-sh is now configurable using the org-babel-sh-command variable
This commit is contained in:
parent
e4bc599745
commit
047ac8ab1b
@ -36,6 +36,10 @@
|
||||
|
||||
(add-to-list 'org-babel-tangle-langs '("sh" "sh" "#!/usr/bin/env sh"))
|
||||
|
||||
(defvar org-babel-sh-command "sh"
|
||||
"Command used to invoke a shell. This will be passed to
|
||||
`shell-command-on-region'")
|
||||
|
||||
(defun org-babel-execute:sh (body params)
|
||||
"Execute a block of Shell commands with org-babel. This
|
||||
function is called by `org-babel-execute-src-block'."
|
||||
@ -122,7 +126,7 @@ last statement in BODY."
|
||||
(with-temp-buffer
|
||||
(insert body)
|
||||
;; (message "buffer=%s" (buffer-string)) ;; debugging
|
||||
(shell-command-on-region (point-min) (point-max) "sh" 'replace)
|
||||
(shell-command-on-region (point-min) (point-max) org-babel-sh-command 'replace)
|
||||
(case result-type
|
||||
(output (buffer-string))
|
||||
(value ;; TODO: figure out how to return non-output values from shell scripts
|
||||
|
Loading…
Reference in New Issue
Block a user