Commit 30009afd authored by Dmitry Antipov's avatar Dmitry Antipov Committed by Glenn Morris
Browse files

Add user, group name completion to dired

Note from committer:

I modified the original patch, by adding the new collection argument
at the end of the argument list rather than in the middle.

* dired-aux.el (dired-mark-read-string): Offer optional completion.
(dired-do-chxxx): Complete chown, chgrp over users, groups.

Fixes: debbugs:7900
parent e5a36063
2012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
* dired-aux.el (dired-mark-read-string): Offer optional completion.
(dired-do-chxxx): Complete chown, chgrp over users, groups. (Bug#7900)
2012-04-17 Glenn Morris <rgm@gnu.org>
* mouse.el (mouse-drag-track):
......
......@@ -245,7 +245,11 @@ List has a form of (file-name full-file-name (attribute-list))."
" (default now): "
": ")))
(new-attribute (dired-mark-read-string prompt nil op-symbol
arg files default))
arg files default
(cond ((eq op-symbol 'chown)
(system-users))
((eq op-symbol 'chgrp)
(system-groups)))))
(operation (concat program " " new-attribute))
failures)
(setq failures
......@@ -385,7 +389,7 @@ Uses the shell command coming from variables `lpr-command' and
(dired-run-shell-command (dired-shell-stuff-it command file-list nil))))
(defun dired-mark-read-string (prompt initial op-symbol arg files
&optional default-value)
&optional default-value collection)
"Read args for a Dired marked-files command, prompting with PROMPT.
Return the user input (a string).
......@@ -399,9 +403,9 @@ of such values, available via history commands. Note that if the
user enters empty input, this function returns the empty string,
not DEFAULT-VALUE."
(dired-mark-pop-up nil op-symbol files
'read-from-minibuffer
'completing-read
(format prompt (dired-mark-prompt arg files))
initial nil nil nil default-value))
collection nil nil initial nil default-value nil))
;;; Cleaning a directory: flagging some backups for deletion.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment