aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2014-05-22 15:56:49 -0400
committerGlenn Morris2014-05-22 15:56:49 -0400
commitaad65192332dfc4a1df0cd2953554c21da243b51 (patch)
treee6e2fd99e7d198a76cd43b8d59cb53597ac31f01
parent74fde0f44f68a14d920db4d24626984e2964368d (diff)
downloademacs-aad65192332dfc4a1df0cd2953554c21da243b51.tar.gz
emacs-aad65192332dfc4a1df0cd2953554c21da243b51.zip
* lisp/shell.el (shell-mode) <shell-dirstack-query>: Bypass bash aliases.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/shell.el5
2 files changed, 7 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a27456241a3..aaf7cb232c8 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12014-05-22 Glenn Morris <rgm@gnu.org>
2
3 * shell.el (shell-mode) <shell-dirstack-query>: Bypass bash aliases.
4
12014-05-21 Daniel Colascione <dancol@dancol.org> 52014-05-21 Daniel Colascione <dancol@dancol.org>
2 6
3 * files.el (interpreter-mode-alist): Add mksh. 7 * files.el (interpreter-mode-alist): Add mksh.
diff --git a/lisp/shell.el b/lisp/shell.el
index 9dc9a013f8b..506f944094b 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -1,7 +1,6 @@
1;;; shell.el --- specialized comint.el for running the shell -*- lexical-binding: t -*- 1;;; shell.el --- specialized comint.el for running the shell -*- lexical-binding: t -*-
2 2
3;; Copyright (C) 1988, 1993-1997, 2000-2014 Free Software Foundation, 3;; Copyright (C) 1988, 1993-1997, 2000-2014 Free Software Foundation, Inc.
4;; Inc.
5 4
6;; Author: Olin Shivers <shivers@cs.cmu.edu> 5;; Author: Olin Shivers <shivers@cs.cmu.edu>
7;; Simon Marshall <simon@gnu.org> 6;; Simon Marshall <simon@gnu.org>
@@ -584,6 +583,8 @@ buffer."
584 (setq shell-dirstack-query 583 (setq shell-dirstack-query
585 (cond ((string-equal shell "sh") "pwd") 584 (cond ((string-equal shell "sh") "pwd")
586 ((string-equal shell "ksh") "echo $PWD ~-") 585 ((string-equal shell "ksh") "echo $PWD ~-")
586 ;; Bypass any aliases. TODO all shells could use this.
587 ((string-equal shell "bash") "command dirs")
587 (t "dirs"))) 588 (t "dirs")))
588 ;; Bypass a bug in certain versions of bash. 589 ;; Bypass a bug in certain versions of bash.
589 (when (string-equal shell "bash") 590 (when (string-equal shell "bash")