summaryrefslogtreecommitdiff
path: root/lisp/minibuffer.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2012-04-20 15:56:59 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2012-04-20 15:56:59 -0400
commited571ccb1d14abc788a29c3b3bbf08aa4b951ab8 (patch)
treeaf1b22cc8aad2570c917cd44c4dde62a8a8eb514 /lisp/minibuffer.el
parent61bb069e8c230357017be65d59ccea36c3cd91b1 (diff)
downloademacs-ed571ccb1d14abc788a29c3b3bbf08aa4b951ab8.tar.gz
* lisp/minibuffer.el (completion-file-name-table): Complete user names.
Diffstat (limited to 'lisp/minibuffer.el')
-rw-r--r--lisp/minibuffer.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index c7e14ca481b..5a990f6ab35 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -1817,6 +1817,12 @@ same as `substitute-in-file-name'."
(condition-case nil
(cond
((eq action 'metadata) '(metadata (category . file)))
+ ((string-match-p "\\`~[^/\\]*\\'" string)
+ (completion-table-with-context "~"
+ (mapcar (lambda (u) (concat u "/"))
+ (system-users))
+ (substring string 1)
+ pred action))
((eq (car-safe action) 'boundaries)
(let ((start (length (file-name-directory string)))
(end (string-match-p "/" (cdr action))))