1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-12 06:21:02 -08:00
emacs/lisp/eshell
Jim Porter 0bb8a011d5 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'.
2023-01-16 17:11:02 -08:00
..
em-alias.el Merge from origin/emacs-29 2023-01-01 05:47:47 -05:00
em-banner.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
em-basic.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
em-cmpl.el Make 'eshell-bol' obsolete 2023-01-14 11:09:02 -08:00
em-dirs.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
em-elecslash.el Make 'eshell-bol' obsolete 2023-01-14 11:09:02 -08:00
em-extpipe.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
em-glob.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
em-hist.el Make 'eshell-bol' obsolete 2023-01-14 11:09:02 -08:00
em-ls.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
em-pred.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
em-prompt.el Add 'file-user-uid' to get the connection-local effective UID 2023-01-16 17:11:02 -08:00
em-rebind.el Make 'eshell-bol' obsolete 2023-01-14 11:09:02 -08:00
em-script.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
em-smart.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
em-term.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
em-tramp.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
em-unix.el Merge from origin/emacs-29 2023-01-01 05:47:47 -05:00
em-xtra.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
esh-arg.el Merge from origin/emacs-29 2023-01-01 05:47:47 -05:00
esh-cmd.el Merge from origin/emacs-29 2023-01-01 05:47:47 -05:00
esh-ext.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
esh-io.el Set the 'field' property for Eshell output 2023-01-14 11:09:02 -08:00
esh-mode.el Use the 'field' property to navigate through Eshell prompts 2023-01-14 11:13:42 -08:00
esh-module.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
esh-opt.el Merge from origin/emacs-29 2023-01-01 05:47:47 -05:00
esh-proc.el Set the 'field' property for Eshell output 2023-01-14 11:09:02 -08:00
esh-util.el Merge from origin/emacs-29 2023-01-01 05:47:47 -05:00
esh-var.el Add 'file-user-uid' to get the connection-local effective UID 2023-01-16 17:11:02 -08:00
eshell.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00