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 #10 received at control <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Yegor Timoshenko <yegortimoshenko <at> riseup.net>
Cc: 30724 <at> debbugs.gnu.org
Subject: Re: bug#30724: eshell: escaped tilde is not treated as such
Date: Thu, 08 Mar 2018 20:15:16 -0500
tags 30724 + confirmed
quit

Yegor Timoshenko <yegortimoshenko <at> riseup.net> writes:

> In M-x eshell (do not run):
>
>   $ touch \~
>   $ ls
>   ~
>   $ rm \~
>   rm: cannot remove '~': Is a directory
>
> I.e. it tried to remove home directory. I've found this by
> accidentially wiping my home directory, but no worry, I've restored a
> btrfs snapshot that was made several minutes before that.
>
> GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.26)
>  of 2018-02-25

Stepping through eshell/rm a bit, I see it gets #("~" 0 1 (escaped t))
as an argument.  So each command is responsible for handling the
escaping correctly.  I think every file-handling eshell function needs
review for this.




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.