GNU bug report logs - #30724
eshell: escaped tilde is not treated as such

Previous Next

Package: emacs;

Reported by: Yegor Timoshenko <yegortimoshenko <at> riseup.net>

Date: Tue, 6 Mar 2018 04:57:03 UTC

Severity: normal

Tags: confirmed, fixed

Fixed in version 26.2

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Noam Postavsky <npostavs <at> gmail.com>
To: Jonathan Kyle Mitchell <kyle <at> jonathanmitchell.org>
Cc: 30724 <at> debbugs.gnu.org, Yegor Timoshenko <yegortimoshenko <at> riseup.net>
Subject: Re: bug#30724: eshell: escaped tilde is not treated as such
Date: Sat, 07 Jul 2018 15:17:30 -0400
Jonathan Kyle Mitchell <kyle <at> jonathanmitchell.org> writes:

> tags 30724 + patch
> quit

You have to send this control <at> debbugs.gnu.org to have effect, generally
you should use Bcc so that further replies don't go there (which is why
you don't see it when other people do this).

> I found a way to get eshell to escape special chars.  It seems most of
> the eshell builtin commands that take file arguments are already tagged
> with the eshell-no-numeric-conversions property.  By adding the true
> part of the if condition in eshell-lisp-command, it is possible to
> quote the arguments of special filenames.  The attached patch checks
> for "~" and "*".

Perhaps we should distinguish between file and non-numeric arguments
though?  E.g., I think the file-name-quote might not make sense for the
commands below:

> ./esh-proc.el\0202:(put 'eshell/kill 'eshell-no-numeric-conversions t)

> ./em-unix.el\0167:(put 'eshell/man 'eshell-no-numeric-conversions t)

> ./em-unix.el\0664:(put 'eshell/make 'eshell-no-numeric-conversions t)

> ./em-unix.el\01050:(put 'eshell/locate 'eshell-no-numeric-conversions 
> ./em-unix.el\01059:(put 'eshell/occur 'eshell-no-numeric-conversions t)
> ./esh-cmd.el\01185:(put 'eshell/which 'eshell-no-numeric-conversions t)

> ./em-tramp.el\097:(put 'eshell/su 'eshell-no-numeric-conversions t)
> ./em-tramp.el\0139:(put 'eshell/sudo 'eshell-no-numeric-conversions t)


> Fix bug#30724 by checking if "*" and "~" are arguments to the current command
> and quoting them relative to `default-directory' if so.  This leverages the
> the fact that the existing eshell builtin commands that accept file arguments
> are tagged with the eshell-no-numeric-conversions property.  The existing
> details of eshell command execution are left unchanged.
>
> * lisp/eshell/esh-cmd.el (eshell-lisp-command)

The ChangeLog item should at the beginning, as in,

* lisp/eshell/esh-cmd.el (eshell-lisp-command): Fix bug#30724 by
checking if "*" and "~" are arguments to the current command ...




This bug report was last modified 6 years and 309 days ago.

Previous Next


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