]> git.eshelyaron.com Git - emacs.git/commitdiff
Always print the expanded directory name for Eshell's "pwd" command
authorJim Porter <jporterbugs@gmail.com>
Thu, 7 Nov 2024 21:57:35 +0000 (13:57 -0800)
committerEshel Yaron <me@eshelyaron.com>
Fri, 8 Nov 2024 13:35:41 +0000 (14:35 +0100)
* 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)

etc/NEWS
lisp/eshell/em-dirs.el

index 44b73a6a984a91860e23b11a3280625a953d7a72..d087d4746af37488367ae25ab9da32f89b02c323 100644 (file)
--- 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'.
+
 \f
 * Lisp Changes in Emacs 31.1
 
index ad0a5beac1e53f59cb932c2f19d420ff14bb313d..e005bc98873c3f7378fcbd99e1d46cd67bbf36a3 100644 (file)
@@ -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.