Subject: Re: bug#18951: eshell-pcomplete removes asterisk when attempting completion

From: Daniel Kraus <[email-masked]>
Date: Thu, 02 Nov 2017 22:15:53 +0800

Noam Postavsky <[email-masked]> writes:

> 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))

I didn't test it too much if something else breaks but it
seems to work. pcomplete doesn't remove the * and company
mode also seems to work without problems now.

Thanks