From: Jim Porter Date: Thu, 7 Nov 2024 21:57:35 +0000 (-0800) Subject: Always print the expanded directory name for Eshell's "pwd" command X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0842c821cd3a18a08ed2d8a41bab8d247d645397;p=emacs.git Always print the expanded directory name for Eshell's "pwd" command * lisp/eshell/em-dirs.el (eshell-pwd-convert-function): Default to 'expand-file-name' on all systems. * etc/NEWS: Announce this change. (cherry picked from commit ef440f59a170c3c69948fca863f368e397d503b4) --- diff --git a/etc/NEWS b/etc/NEWS index 44b73a6a984..d087d4746af 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -621,6 +621,13 @@ All the characters that belong to the 'symbol' script (according to cc-compat.el, info-edit.el, meese.el, otodo-mode.el, rcompile.el, sup-mouse.el, terminal.el, vi.el, vip.el, ws-mode.el, and yow.el. +--- +** The Eshell 'pwd' command now expands the directory name on all systems. +This ensures that user directories are properly expanded to their full +name. Previously, Eshell only did this for MS-Windows systems. To +restore the old behavior, you can set 'eshell-pwd-convert-function' to +'identity'. + * Lisp Changes in Emacs 31.1 diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el index ad0a5beac1e..e005bc98873 100644 --- a/lisp/eshell/em-dirs.el +++ b/lisp/eshell/em-dirs.el @@ -65,9 +65,7 @@ they lack somewhat in feel from the typical shell equivalents." :version "24.1" ; removed eshell-dirs-initialize :type 'hook) -(defcustom eshell-pwd-convert-function (if (eshell-under-windows-p) - #'expand-file-name - #'identity) +(defcustom eshell-pwd-convert-function #'expand-file-name "The function used to normalize the value of Eshell's `pwd'. The value returned by `pwd' is also used when recording the last-visited directory in the last-dir-ring, so it will affect the @@ -75,7 +73,8 @@ form of the list used by `cd ='." :type '(radio (function-item file-truename) (function-item expand-file-name) (function-item identity) - (function :tag "Other"))) + (function :tag "Other")) + :version "31.1") (defcustom eshell-ask-to-save-last-dir 'always "Determine if the last-dir-ring should be automatically saved.