GNU bug report logs - #61221
30.0.50; [PATCH] Support completion of quoted variable refs in Eshell

Previous Next

Package: emacs;

Reported by: Jim Porter <jporterbugs <at> gmail.com>

Date: Thu, 2 Feb 2023 02:29:01 UTC

Severity: normal

Tags: patch

Found in version 30.0.50

Done: Jim Porter <jporterbugs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jim Porter <jporterbugs <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; [PATCH] Support completion of quoted variable refs in Eshell
Date: Wed, 1 Feb 2023 18:28:08 -0800
[Message part 1 (text/plain, inline)]
X-Debbugs-Cc: monnier <at> iro.umontreal.ca

Eshell lets you put quotes around variable names so that the parser can 
tell where the name ends, sort of like ${var} in other shells:

  ~ $ echo $'user-login-name'-suffix
  user-suffix

  ~ $ echo $"user-login-name"-suffix
  user-suffix

However, you can't tab-complete variable names when you do this. Here's 
a fix. I also fixed a couple small issues with completing directory 
names where it would sometimes complete to "whatever/ ". That extra 
trailing space isn't helpful, since you'd have to delete it before 
typing in a subdir.

Probably the most controversial part of this patch is in #0002, where I 
added another dynamic variable 'pcomplete-exit-function' that Pcomplete 
handlers can set to tell Pcomplete what to do after exiting a 
completion. Maybe it would be better to have handlers throw some special 
value for 'pcomplete-completions' that contains this info (sort of like 
the value that a 'completion-at-point-function' returns). I'm not sure 
what the best (and most-compatible) way to do this would be...
[0001-Throw-strings-as-the-values-for-eshell-incomplete.patch (text/plain, attachment)]
[0002-Add-support-for-completing-quoted-variables-in-Eshel.patch (text/plain, attachment)]
[0003-Don-t-add-a-space-after-the-trailing-slash-when-comp.patch (text/plain, attachment)]

This bug report was last modified 2 years and 150 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.