GNU bug report logs - #28064
eshell-cmpl should not auto-complete ~/./

Previous Next

Package: emacs;

Reported by: Yegor Timoshenko <yegortimoshenko <at> gmail.com>

Date: Sat, 12 Aug 2017 13:46:01 UTC

Severity: wishlist

Done: Jim Porter <jporterbugs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Porter <jporterbugs <at> gmail.com>
To: Yegor Timoshenko <yegortimoshenko <at> gmail.com>, 28064 <at> debbugs.gnu.org
Subject: bug#28064: eshell-cmpl should not auto-complete ~/./
Date: Sun, 12 Mar 2023 00:02:52 -0800
[Message part 1 (text/plain, inline)]
On 8/12/2017 6:44 AM, Yegor Timoshenko wrote:
> M-x eshell
> Type `cd ~/.` and press TAB.
> 
> It will auto-complete to `cd ~/./`. I don't think it's useful.

A much-delayed thanks for reporting this. I looked into this, and it was 
due to 'eshell-expand-user-reference' calling 'expand-file-name' on the 
argument. This meant that when you press TAB, the "~/." gets converted 
into "/home/user" before passing the command to Pcomplete. Then 
Pcomplete would incorrectly assume you wanted to complete "/home/user", 
which just becomes "/home/user/".

Attached is a fix. Normally I'd write a regression test for this, but I 
haven't come up with a good way to do this without messing up the user's 
real home directory...
[0001-Don-t-over-normalize-file-names-starting-with-in-Esh.patch (text/plain, attachment)]

This bug report was last modified 2 years and 120 days ago.

Previous Next


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