139 |
:type '(choice regexp (const :tag "None" nil)) |
:type '(choice regexp (const :tag "None" nil)) |
140 |
:group 'pcomplete) |
:group 'pcomplete) |
141 |
|
|
142 |
(defcustom pcomplete-ignore-case (memq system-type '(ms-dos windows-nt)) |
(defcustom pcomplete-ignore-case (memq system-type '(ms-dos windows-nt cygwin)) |
143 |
"*If non-nil, ignore case when doing filename completion." |
"*If non-nil, ignore case when doing filename completion." |
144 |
:type 'boolean |
:type 'boolean |
145 |
:group 'pcomplete) |
:group 'pcomplete) |
311 |
:type 'boolean |
:type 'boolean |
312 |
:group 'pcomplete) |
:group 'pcomplete) |
313 |
|
|
314 |
|
(defcustom pcomplete-termination-string " " |
315 |
|
"*A string that is inserted after any completion or expansion. |
316 |
|
This is usually a space character, useful when completing lists of |
317 |
|
words separated by spaces. However, if your list uses a different |
318 |
|
separator character, or if the completion occurs in a word that is |
319 |
|
already terminated by a character, this variable should be locally |
320 |
|
modified to be an empty string, or the desired separation string." |
321 |
|
:type 'string |
322 |
|
:group 'pcomplete) |
323 |
|
|
324 |
;;; Internal Variables: |
;;; Internal Variables: |
325 |
|
|
326 |
;; for cycling completion support |
;; for cycling completion support |
428 |
(unless (pcomplete-insert-entry |
(unless (pcomplete-insert-entry |
429 |
"" (car pcomplete-current-completions) t |
"" (car pcomplete-current-completions) t |
430 |
pcomplete-last-completion-raw) |
pcomplete-last-completion-raw) |
431 |
(insert-and-inherit " ")) |
(insert-and-inherit pcomplete-termination-string)) |
432 |
(setq pcomplete-current-completions |
(setq pcomplete-current-completions |
433 |
(cdr pcomplete-current-completions)))))) |
(cdr pcomplete-current-completions)))))) |
434 |
|
|
592 |
(symbol-value completef-sym)))) |
(symbol-value completef-sym)))) |
593 |
(if elem |
(if elem |
594 |
(setcar elem 'pcomplete) |
(setcar elem 'pcomplete) |
595 |
(nconc (symbol-value completef-sym) |
(add-to-list completef-sym 'pcomplete)))) |
|
(list 'pcomplete))))) |
|
596 |
|
|
597 |
;;;###autoload |
;;;###autoload |
598 |
(defun pcomplete-shell-setup () |
(defun pcomplete-shell-setup () |
704 |
|
|
705 |
(defun pcomplete-entries (&optional regexp predicate) |
(defun pcomplete-entries (&optional regexp predicate) |
706 |
"Complete against a list of directory candidates. |
"Complete against a list of directory candidates. |
|
This function always uses the last argument as the basis for |
|
|
completion. |
|
707 |
If REGEXP is non-nil, it is a regular expression used to refine the |
If REGEXP is non-nil, it is a regular expression used to refine the |
708 |
match (files not matching the REGEXP will be excluded). |
match (files not matching the REGEXP will be excluded). |
709 |
If PREDICATE is non-nil, it will also be used to refine the match |
If PREDICATE is non-nil, it will also be used to refine the match |
710 |
\(files for which the PREDICATE returns nil will be excluded). |
\(files for which the PREDICATE returns nil will be excluded). |
711 |
If PATH is non-nil, it will be used for completion instead of |
If no directory information can be extracted from the completed |
712 |
consulting the last argument." |
component, DEFAULT-DIRECTORY is used as the basis for completion." |
713 |
(let* ((name (substitute-env-vars pcomplete-stub)) |
(let* ((name (substitute-env-vars pcomplete-stub)) |
714 |
(default-directory (expand-file-name |
(default-directory (expand-file-name |
715 |
(or (file-name-directory name) |
(or (file-name-directory name) |
745 |
(string-match pcomplete-dir-ignore file)) |
(string-match pcomplete-dir-ignore file)) |
746 |
(and pcomplete-file-ignore |
(and pcomplete-file-ignore |
747 |
(string-match pcomplete-file-ignore file)))))))) |
(string-match pcomplete-file-ignore file)))))))) |
748 |
(setq above-cutoff (> (length completions) |
(setq above-cutoff (and pcomplete-cycle-cutoff-length |
749 |
pcomplete-cycle-cutoff-length)) |
(> (length completions) |
750 |
|
pcomplete-cycle-cutoff-length))) |
751 |
(sort completions |
(sort completions |
752 |
(function |
(function |
753 |
(lambda (l r) |
(lambda (l r) |
1016 |
(let (space-added) |
(let (space-added) |
1017 |
(when (and (not (memq (char-before) pcomplete-suffix-list)) |
(when (and (not (memq (char-before) pcomplete-suffix-list)) |
1018 |
addsuffix) |
addsuffix) |
1019 |
(insert-and-inherit " ") |
(insert-and-inherit pcomplete-termination-string) |
1020 |
(setq space-added t)) |
(setq space-added t)) |
1021 |
(setq pcomplete-last-completion-length (- (point) here) |
(setq pcomplete-last-completion-length (- (point) here) |
1022 |
pcomplete-last-completion-stub stub) |
pcomplete-last-completion-stub stub) |