GNU bug report logs -
#19626
25.0.50; eshell: extended directory syntax ("...") does not complete
Previous Next
Reported by: Samer Masterson <nosefrog <at> gmail.com>
Date: Mon, 19 Jan 2015 11:19:02 UTC
Severity: minor
Found in version 25.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> "Michalis V." <mvar.40k <at> gmail.com> writes:
>
>> i cannot reproduce this in 28.0.50. Basically what i did was
>>
>> mkdir ...
>>
>> then repeat the steps above. Eshell autocompletes .../ fine, even adding
>> another similar directory will bring up the dialog:
>
> I think eshell has an "extended directory" concept where "..." is
> supposed to expand to (I think) all parent directories? So there isn't
> supposed to be any directory literally called "...".
>
> I think. But I'm not overly familiar with eshell. Let's see... Yup:
>
> (defun eshell-expand-multiple-dots (filename)
> "Convert `...' to `../..', `....' to `../../..', etc..
oops, i wasn't even aware of this eshell feature, sorry about that!
I did some debugging into how completion works and it looks like
eshell-complete-parse-arguments in em-cmpl.el is responsible for
parsing the arguments before passing them to the generic(?) completion
code. Attached is a patch that adds an additional check at the end of
said defun that will substitute any .../ dots into the proper expanded
form before returning. There are some other defuns that are called by
eshell-complete-parse-arguments, namely eshell-parse-argument(s) but i
*think* this substitution is better suited (read: safer) to be placed to
their caller.
Note that this works for "cd .../", completion for other operations like
cp do not work currently (most probably because cd has its own
implementation in eshell/cd?)
i'm not sure whether this is the correct solution to this problem so if
there are any concerns please let me know and i'll continue the digging
thanks,
Michalis
[em-cmpl.patch (text/x-patch, attachment)]
This bug report was last modified 3 years and 352 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.