|
From: | Jim Porter |
Subject: | bug#58921: Tab completion hangs in eshell |
Date: | Thu, 23 Feb 2023 12:43:54 -0800 |
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.
0001-Fix-Pcompletion-of-tar-when-using-unrecognized-argum.patch
Description: Text document
[Prev in Thread] | Current Thread | [Next in Thread] |