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


View this message in rfc822 format

From: Jonathan Kyle Mitchell <kyle <at> jonathanmitchell.org>
To: 30724 <at> debbugs.gnu.org
Cc: Noam Postavsky <npostavs <at> gmail.com>, "; Yegor Timoshenko" <yegortimoshenko <at> riseup.net>
Subject: bug#30724: eshell: escaped tilde is not treated as such
Date: Fri, 06 Jul 2018 02:24:20 -0500
[Message part 1 (text/plain, inline)]
tags 30724 + patch
quit

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 "*".

;; for reference, here's the set of eshell builtins with the
;; eshell-no-numeric-conversions property
./esh-proc.el\0202:(put 'eshell/kill 'eshell-no-numeric-conversions t)
./em-dirs.el\0409:(put 'eshell/cd 'eshell-no-numeric-conversions t)
./em-dirs.el\0472:(put 'eshell/pushd 'eshell-no-numeric-conversions t)
./em-dirs.el\0502:(put 'eshell/popd 'eshell-no-numeric-conversions t)
./esh-ext.el\0261:(put 'eshell/addpath 'eshell-no-numeric-conversions t
./esh-util.el\091:  (put \\='find-file \\='eshell-no-numeric-
./em-script.el\0127:(put 'eshell/source 'eshell-no-numeric-conversions
./em-script.el\0140:(put 'eshell/. 'eshell-no-numeric-conversions t)
./em-unix.el\0167:(put 'eshell/man 'eshell-no-numeric-conversions t)
./em-unix.el\0309:(put 'eshell/rm 'eshell-no-numeric-conversions t)
./em-unix.el\0326:(put 'eshell/mkdir 'eshell-no-numeric-conversions t)
./em-unix.el\0342:(put 'eshell/rmdir 'eshell-no-numeric-conversions t)
./em-unix.el\0526:(put 'eshell/mv 'eshell-no-numeric-conversions t)
./em-unix.el\0563:(put 'eshell/cp 'eshell-no-numeric-conversions t)
./em-unix.el\0595:(put 'eshell/ln 'eshell-no-numeric-conversions t)
./em-unix.el\0647:(put 'eshell/cat 'eshell-no-numeric-conversions t)
./em-unix.el\0664:(put 'eshell/make 'eshell-no-numeric-conversions t)
./em-unix.el\01031:(put 'eshell/diff '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-ls.el\0336:(put 'eshell/ls '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)

--
Jonathan Kyle Mitchell
[0001-Check-for-filenames-special-to-the-shell-before-runn.patch (text/x-patch, attachment)]

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.