'pcomplete-expand-and-complete)
(define-key eshell-command-map [space] 'pcomplete-expand)
(define-key eshell-command-map [? ] 'pcomplete-expand)
- (define-key eshell-mode-map [tab] 'pcomplete)
- (define-key eshell-mode-map [(control ?i)] 'pcomplete)
+ (define-key eshell-mode-map [tab] 'eshell-pcomplete)
+ (define-key eshell-mode-map [(control ?i)] 'eshell-pcomplete)
+ (add-hook 'completion-at-point-functions
+ #'pcomplete-completions-at-point nil t)
;; jww (1999-10-19): Will this work on anything but X?
(if (featurep 'xemacs)
(define-key eshell-mode-map [iso-left-tab] 'pcomplete-reverse)
(all-completions filename obarray 'functionp))
completions)))))))
+(defun eshell-pcomplete (&optional interactively)
+ "Eshell wrapper for `pcomplete'."
+ (interactive "p")
+ ;; Pretend to be pcomplete so that cycling works (bug#13293).
+ (setq this-command 'pcomplete)
+ (condition-case nil
+ (if interactively
+ (call-interactively 'pcomplete)
+ (pcomplete))
+ (text-read-only (completion-at-point)))) ; Workaround for bug#12838.
+
(provide 'em-cmpl)
;; Local Variables: