Variable: org-babel-shell-set-prompt-commands

org-babel-shell-set-prompt-commands is a variable defined in ob-shell.el.gz.

Value

(("fish" . "function fish_prompt\n	echo \"%s\"\nend")
 ("csh" . "set prompt=\"%s\"\nset prompt2=\"\"")
 ("zsh"
  . "setopt nopromptcr;unset zle_bracketed_paste;PROMPT_COMMAND=;PS1=\"%s\";PS2=")
 (t . "PROMPT_COMMAND=;PS1=\"%s\";PS2="))

Documentation

Alist assigning shells with their prompt setting command.

Each element of the alist associates a shell type from org-babel-shell-names with a template used to create a command to change the default prompt. The template is an argument to format that will be called with a single additional argument: prompt string.

The fallback association template is defined in (t . "template") alist element.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ob-shell.el.gz
(defconst org-babel-shell-set-prompt-commands
  '(;; Fish has no PS2 equivalent.
    ("fish" . "function fish_prompt\n\techo \"%s\"\nend")
    ;; prompt2 is like PS2 in POSIX shells.
    ("csh" . "set prompt=\"%s\"\nset prompt2=\"\"")
    ;; Disable bracketed paste - it messes up out processing and,
    ;; apparently, comint.el.  Also, unset "%   \r" prompts.
    ("zsh" . "setopt nopromptcr;unset zle_bracketed_paste;PROMPT_COMMAND=;PS1=\"%s\";PS2=")
    ;; PROMPT_COMMAND can override PS1 settings.  Disable it.
    ;; Disable PS2 to avoid garbage in multi-line inputs.
    (t . "PROMPT_COMMAND=;PS1=\"%s\";PS2="))
  "Alist assigning shells with their prompt setting command.

Each element of the alist associates a shell type from
`org-babel-shell-names' with a template used to create a command to
change the default prompt.  The template is an argument to `format'
that will be called with a single additional argument: prompt string.

The fallback association template is defined in (t . \"template\")
alist element.")