- (let* ((prog (or (and (boundp 'explicit-shell-file-name) explicit-shell-file-name)
- (getenv "ESHELL") shell-file-name))
- (name (file-name-nondirectory prog)))
- ;; Tell bash not to use readline, except for bash 1.x which
- ;; doesn't grok --noediting. Bash 1.x has -nolineediting, but
- ;; process-send-eof cannot terminate bash if we use it.
- (if (and (not purify-flag)
- (equal name "bash")
- (file-executable-p prog)
- (string-match "bad option"
- (shell-command-to-string
- (concat (shell-quote-argument prog)
- " --noediting"))))
- '("-i")
- '("--noediting" "-i")))
+ ;; Tell bash not to use readline. It's safe to assume --noediting now,
+ ;; as it was introduced in 1996 in Bash version 2.
+ '("--noediting" "-i")