From fa3959f5cbd2c0c4642999bde987ba852373e0dd Mon Sep 17 00:00:00 2001 From: Phil Sainty Date: Wed, 26 Aug 2020 12:03:32 +0200 Subject: [PATCH] term.el: Use correct exit status in suggested dir-tracking functions * lisp/term.el: Make some of the examples better (bug#43055). --- lisp/term.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/term.el b/lisp/term.el index 3c65b63911b..e77c2c1331b 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -241,9 +241,9 @@ ;; printf '\033AnSiTu %s\n' "$USER" ;; printf '\033AnSiTc %s\n' "$PWD" ;; -;; cd() { command cd "$@"; printf '\033AnSiTc %s\n' "$PWD"; } -;; pushd() { command pushd "$@"; printf '\033AnSiTc %s\n' "$PWD"; } -;; popd() { command popd "$@"; printf '\033AnSiTc %s\n' "$PWD"; } +;; cd() { command cd "$@" && printf '\033AnSiTc %s\n' "$PWD"; } +;; pushd() { command pushd "$@" && printf '\033AnSiTc %s\n' "$PWD"; } +;; popd() { command popd "$@" && printf '\033AnSiTc %s\n' "$PWD"; } ;; ;; # Use custom dircolors in term buffers. ;; # eval $(dircolors $HOME/.emacs_dircolors) -- 2.39.2