summaryrefslogtreecommitdiff
path: root/lisp/pcomplete.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2023-08-20 09:41:07 +0200
committerMichael Albinus <michael.albinus@gmx.de>2023-08-20 09:41:07 +0200
commitefb276fef1f580eafa8458fc262a4b35eb3abd5e (patch)
tree19e136ceadfb718a8d6ff09b0dee749ce777071d /lisp/pcomplete.el
parentfd1479a0af1ba896ae194c9fc91ec7dd49416d9b (diff)
downloademacs-efb276fef1f580eafa8458fc262a4b35eb3abd5e.tar.gz
New user option pcomplete-remote-file-ignore
* etc/NEWS: Mention pcomplete-remote-file-ignore. * lisp/pcomplete.el (pcomplete-remote-file-ignore): New user option. (pcomplete--entries): Use it. * lisp/shell.el (shell-completion-vars): Set 'pcomplete-remote-file-ignore'.
Diffstat (limited to 'lisp/pcomplete.el')
-rw-r--r--lisp/pcomplete.el13
1 files changed, 11 insertions, 2 deletions
diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el
index c7ec228c1db..3d8a4e7edaa 100644
--- a/lisp/pcomplete.el
+++ b/lisp/pcomplete.el
@@ -138,6 +138,11 @@
"A regexp of names to be disregarded during directory completion."
:type '(choice regexp (const :tag "None" nil)))
+(defcustom pcomplete-remote-file-ignore nil
+ "Whether to ignore remote file names."
+ :version "30.1"
+ :type 'boolean)
+
(define-obsolete-variable-alias 'pcomplete-ignore-case 'completion-ignore-case
"28.1")
@@ -924,7 +929,10 @@ this is `comint-dynamic-complete-functions'."
(sort comps pcomplete-compare-entry-function)))
,@(cdr (completion-file-name-table s p a)))
(let ((completion-ignored-extensions nil)
- (completion-ignore-case completion-ignore-case))
+ (completion-ignore-case completion-ignore-case)
+ (tramp-mode (and tramp-mode (not pcomplete-remote-file-ignore)))
+ (non-essential (not (file-remote-p s)))
+ (minibuffer-completing-file-name (file-remote-p s))))
(completion-table-with-predicate
#'comint-completion-file-name-table pred 'strict s p a))))))
@@ -1322,7 +1330,8 @@ If specific documentation can't be given, be generic."
"Sort and remove multiples in SEQUENCE.
Sequence should be a vector or list of strings."
(sort (seq-uniq sequence) #'string-lessp))
-(define-obsolete-function-alias 'pcomplete-uniqify-list #'pcomplete-uniquify-list "27.1")
+(define-obsolete-function-alias
+ 'pcomplete-uniqify-list #'pcomplete-uniquify-list "27.1")
(defun pcomplete-process-result (cmd &rest args)
"Call CMD using `call-process' and return the simplest result."