bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#58921: Tab completion hangs in eshell


From: Jim Porter
Subject: bug#58921: Tab completion hangs in eshell
Date: Thu, 23 Feb 2023 12:43:54 -0800

On 2/23/2023 11:34 AM, Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote:
The way I see it, either we still have an inf-loop or your
(pcomplete-match "\\`--.*=" 0) condition is redundant.

 From what you say the inf-loop should only manifest if we match neither

     (pcomplete-match "^--\\([^= \t\n\f]*\\)\\'" 0)

nor

     (pcomplete-match "\\`--.*=" 0)

and indeed:

     tar --pot\ <TAB>

seems to hang.

Ah, good point. Instead of '(pcomplete-match "\\`--.*=" 0)', I think we want to handle all args starting with "--", but not matching "^--\\([^= \t\n\f]*\\)\\'". The goal is to call 'pcomplete-here*' exactly once per option.

I did this a slightly different way in the updated patch by moving all the "--" cases into a single place (likewise with the "-" options). I think this is easier to follow than before, and makes it more obvious that we're calling 'pcomplete-here*' the right number of times.

Attachment: 0001-Fix-Pcompletion-of-tar-when-using-unrecognized-argum.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]