diff options
| author | Jim Porter | 2022-04-01 22:06:02 -0700 |
|---|---|---|
| committer | Eli Zaretskii | 2022-04-17 10:29:07 +0300 |
| commit | 3dc73569b405d80e89c2965daba31ea4ee6664f0 (patch) | |
| tree | 5962ada86eaaca6c1748b0abdd5dab619150a8eb /lisp/eshell | |
| parent | 6358cbc21a816ac95c2e6e22e087ccd3736874bc (diff) | |
| download | emacs-3dc73569b405d80e89c2965daba31ea4ee6664f0.tar.gz emacs-3dc73569b405d80e89c2965daba31ea4ee6664f0.zip | |
Add 'G' argument predicate in Eshell
* lisp/eshell/em-pred.el (eshell-predicate-alist): Add 'G' predicate.
(eshell-predicate-help-string): Document it. (Bug#54470)
* test/lisp/eshell/em-pred-tests.el
(em-pred-test/predicate-effective-gid): New test.
* doc/misc/eshell.text (Argument Predication): Document 'G' predicate.
Diffstat (limited to 'lisp/eshell')
| -rw-r--r-- | lisp/eshell/em-pred.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/eshell/em-pred.el b/lisp/eshell/em-pred.el index 8afc86dd41a..eb5109b82dc 100644 --- a/lisp/eshell/em-pred.el +++ b/lisp/eshell/em-pred.el | |||
| @@ -88,10 +88,10 @@ ordinary strings." | |||
| 88 | (if (file-exists-p file) | 88 | (if (file-exists-p file) |
| 89 | (= (file-attribute-user-id (file-attributes file)) | 89 | (= (file-attribute-user-id (file-attributes file)) |
| 90 | (user-uid))))) | 90 | (user-uid))))) |
| 91 | ;; (?G . (lambda (file) ; owned by effective gid | 91 | (?G . (lambda (file) ; owned by effective gid |
| 92 | ;; (if (file-exists-p file) | 92 | (if (file-exists-p file) |
| 93 | ;; (= (file-attribute-user-id (file-attributes file)) | 93 | (= (file-attribute-group-id (file-attributes file)) |
| 94 | ;; (user-uid))))) | 94 | (group-gid))))) |
| 95 | (?* . (lambda (file) | 95 | (?* . (lambda (file) |
| 96 | (and (file-regular-p file) | 96 | (and (file-regular-p file) |
| 97 | (not (file-symlink-p file)) | 97 | (not (file-symlink-p file)) |
| @@ -161,6 +161,7 @@ PERMISSION BITS (for owner/group/world): | |||
| 161 | 161 | ||
| 162 | OWNERSHIP: | 162 | OWNERSHIP: |
| 163 | U owned by effective uid | 163 | U owned by effective uid |
| 164 | G owned by effective gid | ||
| 164 | u(UID|\\='user\\=') owned by UID/user | 165 | u(UID|\\='user\\=') owned by UID/user |
| 165 | g(GID|\\='group\\=') owned by GID/group | 166 | g(GID|\\='group\\=') owned by GID/group |
| 166 | 167 | ||