diff options
author | Jim Porter <jporterbugs@gmail.com> | 2023-01-10 15:35:18 -0800 |
---|---|---|
committer | Jim Porter <jporterbugs@gmail.com> | 2023-01-16 17:11:02 -0800 |
commit | 0bb8a011d57cb55c16ff502125b60e8e3bb3d5aa (patch) | |
tree | 4756c74e355419d4f14f569f0aa50ea2f13b6a49 /lisp/emacs-lisp/lisp-mode.el | |
parent | bcaa63ac506dc070b29db13326801ff978e8b00d (diff) | |
download | emacs-0bb8a011d57cb55c16ff502125b60e8e3bb3d5aa.tar.gz emacs-0bb8a011d57cb55c16ff502125b60e8e3bb3d5aa.tar.bz2 emacs-0bb8a011d57cb55c16ff502125b60e8e3bb3d5aa.zip |
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'.
Diffstat (limited to 'lisp/emacs-lisp/lisp-mode.el')
0 files changed, 0 insertions, 0 deletions