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: Stefan Monnier
Subject: bug#58921: Tab completion hangs in eshell
Date: Thu, 23 Feb 2023 14:34:39 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

> So we just need to fix the case where the argument matches "\\`--.*=". I'm
> still not really clear on all the details of how Pcomplete works, but
> I think case (2) works because of this code just before my diff:
>
>   (if (pcomplete-match "^--\\([^= \t\n\f]*\\)\\'" 0)
>       ;; FIXME: Extract this list from "tar --help".
>       (pcomplete-here*
>        '("--absolute-names"
>          ;; ...
>          "--volno-file=")))
>
> That is, if we have an arg starting with "--" and without an "=", call
> 'pcomplete-here*'. Even the arg doesn't match anything in that list, it
> should still move forward (I think). However, when we have an "=" in the
> arg, the function instead evaluates the 'cond' block that I modified, so it
> needs to be sure to call 'pcomplete-here*' (or some other function) to make
> forward progress.

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.


        Stefan






reply via email to

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