emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: PC-do-completion with directories adding stars.]


From: Stefan Monnier
Subject: Re: address@hidden: PC-do-completion with directories adding stars.]
Date: Mon, 06 Mar 2006 15:52:47 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>>> When I try it, I don't get that.  Instead I just see "[Ambiguous dir name]"
>>> appended to the minibuffer for 2 seconds.
>> 
>>> Then you must have a subdirectory of ~/ starting with `a'.
>> 
>> No, that wasn't it.  It turns out the difference is that my shell is zsh.
>> If I set SHELL to bash I can now reproduce your description.
>> 
>> This happens to illustrate what I said earlier:
>>> ... Of course, this part of the code is difficult to get right because it
>>> uses an underlying shell to do the globbing ...
>> 
>> I'll see if I can find a good fix for it,

I installed a fix for it.

>   This patch fixes a minor issue with files containing spaces in their
>   name, too. [1]

Yes, my patch doesn't try to address it.

>   However, I don't see what would be a « good fix » for the general
>   completion function (not the PC one).

I'm not sure what needs fixing there.

> !     (shell-command (concat "for f in " name "; do test -e \"$f\" && echo 
> \"$f\"; done") t)

Problem is that this will fail depending on the user's shell (zsh vs tcsh
vs bash vs rc vs ...).
We could maybe use (concat "ls " name) which would do something mostly
equivalent but slightly more portable.  But really we should just use
shell's globbing commands instead.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]