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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28064 in the body.
You can then email your comments to 28064 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#28064; Package emacs. (Sat, 12 Aug 2017 13:46:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Yegor Timoshenko <yegortimoshenko <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 12 Aug 2017 13:46:02 GMT) Full text and rfc822 format available.

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

From: Yegor Timoshenko <yegortimoshenko <at> gmail.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: eshell-cmpl should not auto-complete ~/./
Date: Sat, 12 Aug 2017 13:44:48 +0000
[Message part 1 (text/plain, inline)]
GNU Emacs 25.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.16)
 of 2017-08-09

To reproduce:

M-x eshell
Type `cd ~/.` and press TAB.

It will auto-complete to `cd ~/./`. I don't think it's useful.
[Message part 2 (text/html, inline)]

Severity set to 'wishlist' from 'minor' Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Mon, 10 Aug 2020 16:54:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28064; Package emacs. (Sun, 12 Mar 2023 08:03:01 GMT) Full text and rfc822 format available.

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

From: Jim Porter <jporterbugs <at> gmail.com>
To: Yegor Timoshenko <yegortimoshenko <at> gmail.com>, 28064 <at> debbugs.gnu.org
Subject: Re: 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)]

Reply sent to Jim Porter <jporterbugs <at> gmail.com>:
You have taken responsibility. (Sun, 19 Mar 2023 02:59:01 GMT) Full text and rfc822 format available.

Notification sent to Yegor Timoshenko <yegortimoshenko <at> gmail.com>:
bug acknowledged by developer. (Sun, 19 Mar 2023 02:59:02 GMT) Full text and rfc822 format available.

Message #15 received at 28064-done <at> debbugs.gnu.org (full text, mbox):

From: Jim Porter <jporterbugs <at> gmail.com>
To: Yegor Timoshenko <yegortimoshenko <at> gmail.com>, 28064-done <at> debbugs.gnu.org
Subject: Re: bug#28064: eshell-cmpl should not auto-complete ~/./
Date: Sat, 18 Mar 2023 19:58:20 -0700
On 3/12/2023 12:02 AM, Jim Porter wrote:
> 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...

Merged as 6afa91f7966. Closing this now.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 16 Apr 2023 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 347 days ago.

Previous Next


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