]> git.eshelyaron.com Git - emacs.git/commit
Fix Pcompletion of "tar" when using unrecognized arguments
authorJim Porter <jporterbugs@gmail.com>
Fri, 10 Feb 2023 07:27:50 +0000 (23:27 -0800)
committerJim Porter <jporterbugs@gmail.com>
Wed, 8 Mar 2023 21:36:09 +0000 (13:36 -0800)
commit38427494d5b86d803f941b77134886ba5eec20dd
tree59546a5d528882ce41087c7cc60249aa0cc8dd23
parent2e73dec15f2555128c370ba48a077f1a178b2731
Fix Pcompletion of "tar" when using unrecognized arguments

Previously, arguments to tar like "--warning=no-timestamp" would cause
Pcompletion to hang (bug#58921).

This simplifies the logic flow by moving all the cases for "--"
arguments inside the THEN form of '(if (pcomplete-match "^--" 0)', and
for all "-" arguments inside the ELSE form.

* lisp/pcmpl-gnu.el (pcmpl-gnu--tar-long-options): New variable.
(pcomplete/tar): Properly handle completion of arguments that look
like "--ARG=", even if they're not recognized by this function.
lisp/pcmpl-gnu.el