From: Jim Porter <jporterbugs@gmail.com>
To: Augusto Stoffel <arstoffel@gmail.com>,
Stefan Monnier <monnier@iro.umontreal.ca>
Cc: John Wiegley <johnw@newartisans.com>,
Gregory Heytings <gregory@heytings.org>,
Eli Zaretskii <eliz@gnu.org>,
59956@debbugs.gnu.org
Subject: bug#59956: 29.0.60: Failure when completing arguments in Eshell after variable interpolation
Date: Mon, 19 Dec 2022 10:04:51 -0800 [thread overview]
Message-ID: <64fc569c-6e35-139c-f2bc-e56845e57dc4@gmail.com> (raw)
In-Reply-To: <87v8m7heh8.fsf@gmail.com>
On 12/19/2022 2:31 AM, Augusto Stoffel wrote:
> If $foo is "-u -v"`, your patch will make pcomplete see this as a single
> argument, no?
For Eshell at least, that's what it should do:
~ $ setq foo "-AlF ."
-AlF .
~/src/emacs/build $ ls $foo
/usr/bin/ls: invalid option -- ' '
Try '/usr/bin/ls --help' for more information.
Variable expansions in Eshell work more like they do in Zsh, where they
*aren't* split into multiple arguments on word boundaries.
> I think it makes sense to send the string "$foo" with the list '("-u"
> "-v") embedded as text property, and add some convenience functions to
> fetch the list for the pcomplete functions that can handle the more
> refined information.
I think the best would be if code that invokes Pcomplete would tell
Pcomplete the expanded forms of its arguments like it does now, but to
additionally make sure that the Pcomplete function sees those arguments
the way the actual command would. If Eshell provided a flattened list of
strings to Pcomplete, then everything should Just Work, right?
However, I'm not sure how to do that *and* be able to provide the
un-stringified version so that Pcomplete functions for built-in Eshell
commands can access those arguments in their original (but still
expanded) forms. Can Eshell know ahead of time what form to provide its
arguments in? Should it just provide both and let the Pcomplete function
pick its poison?
prev parent reply other threads:[~2022-12-19 18:04 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-11 1:25 bug#59956: 29.0.60: Failure when completing arguments in Eshell after variable interpolation Jim Porter
2022-12-11 7:44 ` Eli Zaretskii
2022-12-11 8:56 ` Augusto Stoffel
2022-12-11 15:27 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-12 22:21 ` Gregory Heytings
2022-12-12 22:37 ` Augusto Stoffel
2022-12-12 23:27 ` Gregory Heytings
2022-12-16 11:20 ` Augusto Stoffel
2022-12-16 6:09 ` Jim Porter
2022-12-16 14:13 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-16 14:28 ` Gregory Heytings
2022-12-19 0:54 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-19 1:19 ` Gregory Heytings
2022-12-19 2:15 ` Jim Porter
2022-12-19 3:07 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-19 15:00 ` Gregory Heytings
2022-12-19 16:22 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-19 22:22 ` Gregory Heytings
2022-12-21 6:32 ` Jim Porter
2022-12-21 9:28 ` Gregory Heytings
2022-12-29 22:02 ` Gregory Heytings
2022-12-19 10:31 ` Augusto Stoffel
2022-12-19 16:21 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-19 18:04 ` Jim Porter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=64fc569c-6e35-139c-f2bc-e56845e57dc4@gmail.com \
--to=jporterbugs@gmail.com \
--cc=59956@debbugs.gnu.org \
--cc=arstoffel@gmail.com \
--cc=eliz@gnu.org \
--cc=gregory@heytings.org \
--cc=johnw@newartisans.com \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).