]>
git.eshelyaron.com Git - emacs.git/commit
Add 'file-user-uid' to get the connection-local effective UID
In particular, this lets Eshell show a "#" root prompt sigil when the
user has sudo'ed via "cd /sudo::" (bug#60722).
* lisp/simple.el (file-user-uid): New function.
* lisp/net/tramp.el (tramp-file-name-for-operation): Add
'file-user-uid'.
(tramp-handle-file-user-uid): New function.
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
Add 'file-user-uid'.
* lisp/net/tramp-archive.el (tramp-archive-handle-file-user-uid): New
function...
(tramp-archive-file-name-handler-alist): ... use it.
* lisp/eshell/em-prompt.el (eshell-prompt-function): Use
'file-user-uid'.
* lisp/eshell/esh-var.el (eshell-variable-aliases-list): Add '$UID'.
* test/lisp/eshell/esh-var-tests.el (esh-var-test/uid-var): New test.
* doc/lispref/os.texi (User Identification): Document 'file-user-uid'.
* doc/lispref/files.texi (Magic File Names): Mention 'file-user-uid'.
* doc/misc/eshell.texi (Variables): Document '$UID'. Add a missing
index entry for '$INSIDE_EMACS'.
* etc/NEWS: Announce 'file-user-uid'.
18 files changed: