Function: term--bash-needs-EMACSp

term--bash-needs-EMACSp is a byte-compiled function defined in term.el.gz.

Signature

(term--bash-needs-EMACSp)

Documentation

Return t if Bash is old, nil if it is new or not in use.

Source Code

;; Defined in /usr/src/emacs/lisp/term.el.gz
(defun term--bash-needs-EMACSp ()
  "Return t if Bash is old, nil if it is new or not in use."
  (eq 43
      (or term--bash-needs-EMACS-status
          (setf
           term--bash-needs-EMACS-status
           (let ((process-environment
                  (cons "BASH_ENV" process-environment)))
             (condition-case nil
                 (call-process
                  "bash" nil nil nil "-c"
                  "case $BASH_VERSION in [0123].*|4.[0123].*) exit 43;; esac")
               (error 0)))))))