[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using pcomplete for read-shell-command
From: |
Juri Linkov |
Subject: |
Re: Using pcomplete for read-shell-command |
Date: |
Wed, 25 Nov 2009 19:31:14 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) |
> I don't use shell-mode much, but I enter shell commands occasionally and
> find the completion behavior to be a bit poor sometimes.
> Pcomplete is a bit more clever, since it knows about the arguments of
> various commands. I've been using the patch below for that reason.
>
> Using pcomplete there was proposed a long time ago and was rejected
> because the behavior was too different from our normal completion, but
> the patch below uses the new pcomplete-std-complete which uses
> pcomplete's infrastructure but with the normal UI on top of it.
>
> As mentioned, I only enter commands occasionally, so it hasn't been
> tested extensively. The only problem I already know with it is that it
> doesn't do partial-completion of file names (tho I have a patch for it
> in pcomplete.el, but it's a bit risky, so I'd rather leave it for
> later).
I tried, and it doesn't complete command names at the beginning of
the command line. For instance, without your patch `M-! ca TAB'
displayed a list of command names. But with your patch it displays
a list of files in the current directory.
BTW, I now noticed that switch-to-completions is not bound to
M-v/<prior> in minibuffer-local-shell-command-map. Maybe
minibuffer-local-shell-command-map should inherit from
minibuffer-local-completion-map where M-v/<prior> are bound?
--
Juri Linkov
http://www.jurta.org/emacs/