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

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

bug#61778: 30.0.50; [PATCH] Be more cautious in completing Eshell variab


From: Jim Porter
Subject: bug#61778: 30.0.50; [PATCH] Be more cautious in completing Eshell variable assignments
Date: Fri, 24 Feb 2023 22:02:14 -0800

X-Debbugs-Cc: monnier@iro.umontreal.ca

Starting from "emacs -Q":

  M-x shell RET
  tar --directory=<TAB>
  ;; Notice that completions only show directories.

  M-x eshell RET
  tar --directory=<TAB>
  ;; Completions include files *and* directories(!)

After quite a bit of digging, I figured out the issue: Eshell was treating "--directory=" as the beginning of a local variable assignment (like when you run "CC=gcc make"). The function 'eshell-complete-variable-assignment' is over-aggressive in identifying local variable assignments, and so it picked this up as a false positive.

Attached is a fix for this, plus a regression test.

Attachment: 0001-Be-more-cautious-in-completing-Eshell-variable-assig.patch
Description: Text document


reply via email to

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