aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2002-10-31 23:37:15 +0000
committerKim F. Storm2002-10-31 23:37:15 +0000
commit969a0631069a18e2b9a7fa2f59a4f4336c5c616c (patch)
treedc9337cc1172b96a42a1d3e45bfe136d43d6ca41
parent32f53dacac15bde9f79a1c57717360836f668381 (diff)
downloademacs-969a0631069a18e2b9a7fa2f59a4f4336c5c616c.tar.gz
emacs-969a0631069a18e2b9a7fa2f59a4f4336c5c616c.zip
(explicit-bash-args): Bash 1.x doesn't grook
--noediting option; added run-time check to exclude it.
-rw-r--r--lisp/shell.el14
1 files changed, 12 insertions, 2 deletions
diff --git a/lisp/shell.el b/lisp/shell.el
index 0eaea9af27f..fa4f31ce5f0 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -276,8 +276,18 @@ Value is a list of strings, which may be nil."
276 :group 'shell) 276 :group 'shell)
277 277
278(defcustom explicit-bash-args 278(defcustom explicit-bash-args
279 ;; Tell bash not to use readline. 279 ;; Tell bash not to use readline, except for bash 1.x which doesn't grook --noediting.
280 '("--noediting" "-i") 280 ;; Bash 1.x has -nolineediting, but process-send-eof cannot terminate bash if we use it.
281 (let* ((prog (or (and (boundp 'explicit-shell-file-name) explicit-shell-file-name)
282 (getenv "ESHELL") shell-file-name))
283 (name (file-name-nondirectory prog)))
284 (if (and (not purify-flag)
285 (equal name "bash")
286 (file-executable-p prog)
287 (string-match "bad option"
288 (shell-command-to-string (concat prog " --noediting"))))
289 '("-i")
290 '("--noediting" "-i")))
281 "*Args passed to inferior shell by M-x shell, if the shell is bash. 291 "*Args passed to inferior shell by M-x shell, if the shell is bash.
282Value is a list of strings, which may be nil." 292Value is a list of strings, which may be nil."
283 :type '(repeat (string :tag "Argument")) 293 :type '(repeat (string :tag "Argument"))