]> git.eshelyaron.com Git - emacs.git/commitdiff
term.el: Use correct exit status in suggested dir-tracking functions
authorPhil Sainty <psainty@orcon.net.nz>
Wed, 26 Aug 2020 10:03:32 +0000 (12:03 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 26 Aug 2020 10:03:32 +0000 (12:03 +0200)
* lisp/term.el: Make some of the examples better (bug#43055).

lisp/term.el

index 3c65b63911b79a2e0cf0ae83441da91c255ecd9a..e77c2c1331b83121206e3454d004cac7686ffe48 100644 (file)
 ;;             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)