emacs/lisp/eshell
Jim Porter 40d6609563 Use connection-aware functions when getting the UID/GID in Eshell
This means, for example, that when using Tramp to sudo in Eshell, "rm"
queries the user before deleting anything (bug#63221).

* lisp/eshell/esh-util.el (eshell-user-login-name): New function...
* lisp/eshell/em-unix.el (eshell/whoami): ... use it.

* lisp/eshell/em-ls.el (eshell-ls-applicable): Use 'file-user-uid' and
'eshell-user-login-name'.
(eshell-ls-decorated-name): Use 'file-user-uid'.

* lisp/eshell/em-pred.el (eshell-predicate-alist): Use 'file-user-uid'
and 'file-group-gid'.

* lisp/eshell/em-unix.el (eshell-interactive-query): New widget...
(eshell-rm-interactive-query, eshell-mv-interactive-query)
(eshell-cp-interactive-query, eshell-ln-interactive-query): ... use
it.
(eshell-interactive-query-p): New function...
(eshell/rm, eshell/mv, eshell/cp, eshell/ln): ... use it.

* lisp/simple.el (file-group-gid): New function.

* lisp/net/ange-ftp.el (ange-ftp-file-group-gid): New function...
(file-group-gid): ... use it.

* lisp/net/tramp.el (tramp-handle-file-group-gid):
* lisp/net/tramp-archive.el (tramp-archive-handle-file-group-gid): New
functions.

* lisp/net/tramp.el (tramp-file-name-for-operation): Add
'file-group-gid'.

* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-archive.el (tramp-archive-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-group-gid' mapping.

* test/lisp/net/tramp-tests.el (tramp-test44-file-user-group-ids):
* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test44-file-user-group-ids): Add tests for
'file-group-gid'.

* doc/lispref/files.texi (Magic File Names): Mention 'file-group-gid'.

* doc/lispref/os.texi (User Identification): Document
'file-group-gid', and move 'group-real-gid' to match the order of
'user-real-uid'.

* etc/NEWS: Announce 'file-group-gid'.
2023-05-02 21:28:34 -07:00
..
em-alias.el Merge from origin/emacs-29 2023-01-01 05:47:47 -05:00
em-banner.el ; Don't require 'eshell' in other Eshell files 2023-02-15 15:45:50 -08:00
em-basic.el ; Don't require 'eshell' in other Eshell files 2023-02-15 15:45:50 -08:00
em-cmpl.el Avoid parsing some Eshell forms when performing completion 2023-03-28 12:03:29 -07:00
em-dirs.el Fix expansion of globs that contain a ~USER reference 2023-03-27 21:04:27 -07:00
em-elecslash.el Make 'eshell-bol' obsolete 2023-01-14 11:09:02 -08:00
em-extpipe.el Allow unloading Eshell 2023-02-15 17:31:52 -08:00
em-glob.el Use t for non-nil default values in boolean defcustom declarations 2023-04-28 15:03:47 +02:00
em-hist.el Allow unloading Eshell 2023-02-15 17:31:52 -08:00
em-ls.el Use connection-aware functions when getting the UID/GID in Eshell 2023-05-02 21:28:34 -07:00
em-pred.el Use connection-aware functions when getting the UID/GID in Eshell 2023-05-02 21:28:34 -07:00
em-prompt.el ; Don't require 'eshell' in other Eshell files 2023-02-15 15:45:50 -08:00
em-rebind.el ; Don't require 'eshell' in other Eshell files 2023-02-15 15:45:50 -08:00
em-script.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
em-smart.el Allow unloading Eshell 2023-02-15 17:31:52 -08:00
em-term.el ; Don't require 'eshell' in other Eshell files 2023-02-15 15:45:50 -08:00
em-tramp.el ; Don't require 'eshell' in other Eshell files 2023-02-15 15:45:50 -08:00
em-unix.el Use connection-aware functions when getting the UID/GID in Eshell 2023-05-02 21:28:34 -07:00
em-xtra.el ; Don't require 'eshell' in other Eshell files 2023-02-15 15:45:50 -08:00
esh-arg.el Add support for completing special references (e.g. buffers) in Eshell 2023-03-11 18:49:28 -08:00
esh-cmd.el Fix using background commands in 'eshell-command' 2023-04-02 15:05:53 -07: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 ; Throw strings as the values for 'eshell-incomplete' 2023-02-23 14:09:36 -08:00
esh-module.el Allow unloading Eshell 2023-02-15 17:31:52 -08:00
esh-opt.el Allow unloading Eshell 2023-02-15 17:31:52 -08:00
esh-proc.el ; Add tests for synchronous processes in Eshell 2023-04-02 14:15:45 -07:00
esh-util.el Use connection-aware functions when getting the UID/GID in Eshell 2023-05-02 21:28:34 -07:00
esh-var.el Simplify parsing subcommands slightly 2023-03-28 12:02:46 -07:00
eshell.el Use the 'interactive' spec to set arguments for 'eshell-command' 2023-04-02 15:05:53 -07:00