|
From: | Jim Porter |
Subject: | Re: Shell quoting in Eshell (was: eshell-batch-file) |
Date: | Sun, 9 Jun 2024 13:07:05 -0700 |
On 6/9/2024 12:15 PM, Eli Zaretskii wrote:
... The problem, in particular with the Eshell test suite, is that that the same utility functions are used with many different commands and many different situations, and so in general it is almost impossible to fix this inside the utility function which actually quotes the arguments, because the function doesn't know how will the command be called and even what are the arguments it is quoting.
I'll take a look at this in some more detail. I've tried to be cautious about this in the tests, but since I only have a GNU/Linux dev environment set up, it seems some mistakes have slipped through.
Curiously, there is already eshell-quote-argument, but it doesn't produce the same effect as shell-quote-argument with 2nd arg non-nil, which is why in esh-proc-tests.el I couldn't use eshell-quote-argument. Any idea why eshell-quote-argument is different?
Hmm, I'm not immediately sure, although I have a feeling that's a bug. In particular, 'eshell-quote-argument' doesn't quote parens, which seems like a problem since that's how you write Lisp forms in Eshell. Surely we'd want to quote those. I'll take a look though, and see if I can fix things so we can use 'eshell-quote-argument' in the tests at the right spots.
In any case, I suggest at some point to discuss how to handle quoting in a more systematic way, because it was a cause of constant problems when I ran the Eshell tests today and fixed those which failed.
Thanks for all the fixes. I'll go through them and see if there are any subsequent improvements I should make. If you run into any similar problems in the future, feel free to ping me first and I can try to make the fixes on my end (so long as I'm available) so you don't have to.
[Prev in Thread] | Current Thread | [Next in Thread] |