diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-04-20 15:56:59 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-04-20 15:56:59 -0400 |
commit | ed571ccb1d14abc788a29c3b3bbf08aa4b951ab8 (patch) | |
tree | af1b22cc8aad2570c917cd44c4dde62a8a8eb514 /lisp/minibuffer.el | |
parent | 61bb069e8c230357017be65d59ccea36c3cd91b1 (diff) | |
download | emacs-ed571ccb1d14abc788a29c3b3bbf08aa4b951ab8.tar.gz |
* lisp/minibuffer.el (completion-file-name-table): Complete user names.
Diffstat (limited to 'lisp/minibuffer.el')
-rw-r--r-- | lisp/minibuffer.el | 6 |
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)))) |