[Top][All Lists]
[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
- Re: address@hidden: PC-do-completion with directories adding stars.], (continued)
- Re: address@hidden: PC-do-completion with directories adding stars.], Michael Cadilhac, 2006/03/05
- Re: address@hidden: PC-do-completion with directories adding stars.], Eli Zaretskii, 2006/03/05
- Re: address@hidden: PC-do-completion with directories adding stars.], Stefan Monnier, 2006/03/05
- Re: address@hidden: PC-do-completion with directories adding stars.], Luc Teirlinck, 2006/03/05
- Re: address@hidden: PC-do-completion with directories adding stars.], Stefan Monnier, 2006/03/05
- Re: address@hidden: PC-do-completion with directories adding stars.], Luc Teirlinck, 2006/03/05
- Re: address@hidden: PC-do-completion with directories adding stars.], Stefan Monnier, 2006/03/06
- Re: address@hidden: PC-do-completion with directories adding stars.], Luc Teirlinck, 2006/03/06
- Re: address@hidden: PC-do-completion with directories adding stars.], Stefan Monnier, 2006/03/06
- Re: address@hidden: PC-do-completion with directories adding stars.], Michael Cadilhac, 2006/03/06
- Re: address@hidden: PC-do-completion with directories adding stars.],
Stefan Monnier <=
- Re: address@hidden: PC-do-completion with directories adding stars.], Michael Cadilhac, 2006/03/06
- Re: address@hidden: PC-do-completion with directories adding stars.], Eli Zaretskii, 2006/03/07
- Re: address@hidden: PC-do-completion with directories adding stars.], Juanma Barranquero, 2006/03/07
- Re: address@hidden: PC-do-completion with directories adding stars.], Eli Zaretskii, 2006/03/07
- Re: address@hidden: PC-do-completion with directories adding stars.], Juanma Barranquero, 2006/03/07
Re: address@hidden: PC-do-completion with directories adding stars.], Richard Stallman, 2006/03/05