From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.devel Subject: Re: Shell quoting in Eshell (was: eshell-batch-file) Date: Sat, 15 Jun 2024 13:06:53 -0700 Message-ID: References: <86cyoqbq7m.fsf@gnu.org> <6a0e51ee-f4a2-c668-fcc7-eb83954539d5@gmail.com> <86bk4a9bcs.fsf@gnu.org> <86ed8yv951.fsf@gnu.org> <8826aea7-75dd-c147-3dd1-93489038a1ac@gmail.com> <86y176rpiu.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------tWnWW39jErmQKsgLiKNoG0m0" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1473"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 15 22:07:35 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sIZgU-0000Gh-UF for ged-emacs-devel@m.gmane-mx.org; Sat, 15 Jun 2024 22:07:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sIZfu-0000pA-12; Sat, 15 Jun 2024 16:06:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sIZft-0000oz-54 for emacs-devel@gnu.org; Sat, 15 Jun 2024 16:06:57 -0400 Original-Received: from mail-io1-xd2d.google.com ([2607:f8b0:4864:20::d2d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sIZfr-0002u3-GV; Sat, 15 Jun 2024 16:06:56 -0400 Original-Received: by mail-io1-xd2d.google.com with SMTP id ca18e2360f4ac-7eb6ca2cd09so129999939f.2; Sat, 15 Jun 2024 13:06:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718482014; x=1719086814; darn=gnu.org; h=in-reply-to:from:references:cc:to:content-language:subject :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=Yy4SZiNfNfjSpgj+o0P2ToCN3mwS6sN0GAx2ORUBOfQ=; b=hsWVrlU8vcsUgfn+WdPmgi/vWKZV34wO0lWjGoTNeEJ0pyqac/1WA0pPj0vDmjs/L9 9mKOxGc0rpmcYKBVsh+asYwBjgXDoN+CZl4z8H45DB8g2XYhZslVnswCL7jC0k9mJ1tM eBXyqJMujwvHQEkzlZVFnIq0H1MZEfWRlUpWwNXnxCeCxBm5vrbxHmOXedc5VU5D8utR ueyiAGnfiSVvO3raZCJdb4Xo0bSXJ2t53Xjvbqf327Pw5XSwdQioBgxK7fQI3SCU8Lj7 yJS+7CjyBeVVzC+qfLWPIQQZJSTQwUpDZBOijOjj54oTzQl1quVmRvJ1O0YpMMx7BAkO FuRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718482014; x=1719086814; h=in-reply-to:from:references:cc:to:content-language:subject :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=Yy4SZiNfNfjSpgj+o0P2ToCN3mwS6sN0GAx2ORUBOfQ=; b=txUU+RZK/YsP+fDrsYDHI1+QuaJT7go2iLF49MGZ/zndDb1qguPJvWqTycvrbLk2fV 68u9MgNZVw3sdcPLMxja8039jISJvhPm4FhwIDCNJHl20gwijUFhT52tp6AObltW/hVO Aba7mtwC8hiHvuDcSdPmzkSAl3Fp/3R08nPmHs0pTl7nFV3xwFyIaaEy27girOh703W8 TFeftQ+3ZsbM+7m6F9IpxIG0LJKpw/L9rvzg9gyibFn5kKMYPKmANdD7hNVaMlUrKaOu mNXaCUkPWQLJ+tuUX152mIvV0VZjYktUds12iaPGDHzV8SZL9uoTut+ovyJaEqpyt2Xi g6GQ== X-Gm-Message-State: AOJu0YzbUH0Tq1QC6VkBPU4F4Zu4TutsyGRi4ShOI6lHV4fNMPQOcbK9 0bPTuk3E3ry5vige9rHBWKQkZUjQpsY8cU42y5s8IL4W3rAQ1JfOr64GEg== X-Google-Smtp-Source: AGHT+IGFnUL09cC04TQuBn/PHUuMqo1rgloRX5E/PKq/tGJnW5GjoCy9zp/usiI51iEkGlm3+zNiUg== X-Received: by 2002:a05:6602:2b02:b0:7eb:81a3:c396 with SMTP id ca18e2360f4ac-7ebeb4c6a12mr618606639f.9.1718482013656; Sat, 15 Jun 2024 13:06:53 -0700 (PDT) Original-Received: from [192.168.1.2] (syn-023-240-098-037.res.spectrum.com. [23.240.98.37]) by smtp.googlemail.com with ESMTPSA id 8926c6da1cb9f-4b956a240f1sm1620130173.141.2024.06.15.13.06.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 15 Jun 2024 13:06:52 -0700 (PDT) Content-Language: en-US In-Reply-To: <86y176rpiu.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::d2d; envelope-from=jporterbugs@gmail.com; helo=mail-io1-xd2d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:320170 Archived-At: This is a multi-part message in MIME format. --------------tWnWW39jErmQKsgLiKNoG0m0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 6/15/2024 12:10 PM, Eli Zaretskii wrote: > Test esh-cmd-test/which/plain/external-program condition: [snip] > :value nil :explanation > (nonequal-result (command "which sh") > (result #("D:/usr/MSYS/bin/sh.exe\n" 22 23 ...)) > (expected "d:/usr/MSYS/bin/sh.exe\n")))) > FAILED 59/66 esh-cmd-test/which/plain/external-program (0.003953 sec) at lisp/eshell/esh-cmd-tests.el:538 > > IOW: you run "which SOMETHING" and pretend to know how it will > capitalize the drive letter. Ah ha! If that's the only failure, then I think this would work? (If there are other failures, then I could add a PREDICATE argument to 'eshell-command-result-equal' and use that in the necessary places.) --------------tWnWW39jErmQKsgLiKNoG0m0 Content-Type: text/plain; charset=UTF-8; name="eshell-which.diff" Content-Disposition: attachment; filename="eshell-which.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL3Rlc3QvbGlzcC9lc2hlbGwvZXNoLWNtZC10ZXN0cy5lbCBiL3Rlc3Qv bGlzcC9lc2hlbGwvZXNoLWNtZC10ZXN0cy5lbAppbmRleCAxNjZhMGJhMWZmZi4uOTc5OWFm YTU2NjUgMTAwNjQ0Ci0tLSBhL3Rlc3QvbGlzcC9lc2hlbGwvZXNoLWNtZC10ZXN0cy5lbAor KysgYi90ZXN0L2xpc3AvZXNoZWxsL2VzaC1jbWQtdGVzdHMuZWwKQEAgLTUzOCw4ICs1Mzgs MTIgQEAgZXNoLWNtZC10ZXN0L3doaWNoL3BsYWluL2Vz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