[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18951: eshell-pcomplete removes asterisk when attempting completion
From: |
Noam Postavsky |
Subject: |
bug#18951: eshell-pcomplete removes asterisk when attempting completion |
Date: |
Thu, 02 Nov 2017 07:32:13 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) |
Daniel Kraus <daniel@kraus.my> writes:
> Noam Postavsky <npostavs@users.sourceforge.net> writes:
>
>> A good start would be to step through eshell-pcomplete with edebug and
>> find the piece of code which deletes the asterisk.
>
> It's in `pcomplete-parse-arguments` (in pcomplete.el)
> Line 776 on master:
> ```
> (when (and begin (not pcomplete-show-list))
> (delete-region begin (point))
> (pcomplete-insert-entry "" pcomplete-stub))
> ```
Hmm, does this do the right thing?
--- i/lisp/pcomplete.el
+++ w/lisp/pcomplete.el
@@ -772,7 +772,7 @@ pcomplete-parse-arguments
(setq c (cdr c)))
(setq pcomplete-stub (substring common-stub 0 len)
pcomplete-autolist t)
- (when (and begin (not pcomplete-show-list))
+ (when (and begin (> len 0) (not pcomplete-show-list))
(delete-region begin (point))
(pcomplete-insert-entry "" pcomplete-stub))
(throw 'pcomplete-completions completions))