help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: shell-mode autocompletion uglinesses


From: Kai Großjohann
Subject: Re: shell-mode autocompletion uglinesses
Date: Mon, 02 Dec 2002 21:20:34 +0100
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu)

"Felix E. Klee" <felix.klee@inka.de> writes:

> there are two things that bother me enormously when using autocompletion in
> shell-mode.
> 1. When I enter
>      ls /usr/
>    and press tab nothing happens. What I expect, however, is that I get a
>    list of choices containing all files and directories in "/usr/".

What happens if you press TAB again?

> 2. Suppose my EMACS window is split horizontally with a shell in one buffer
>    and a README giving me instructions in another buffer. When I enter
>      ls /usr/in
>    I see the following list in the *Completions* buffer:
>      include/          info/
>    Then I press "n tab" and the shell command expands into
>      ls /usr/include
>    as intended. Now, however, the *Completions* buffer is still there 
>    although it is not needed anymore. How do I make it go away once I have
>    finished my completion?

I think pcomplete has a mechanism for making the completions buffer
disappear.  At least I know that eshell does this.

Maybe Emacs will use pcomplete completion by default in the future.

> If I cannot change the above behavior I'd rather use tab autocompletion as 
> implemented in my shell (BASH). Is this possible?

Once upon a time, there was a file which purported to use the tcsh
tab completion in shell mode.  It was years ago.  Maybe it also works
for bash.  I have no idea how to find the file.  It had `tcsh' in its
name and possibly also `complet'.

Another alternative would be to set up shell mode to use pcomplete
now.  Hm.  Ah!  Maybe it's sufficient to

    (require 'shell)
    (define-key shell-mode-map (kbd "TAB") 'pcomplete)

How about you try this?

pcomplete completion is programmable.  It groks `make' (completes on
targets from Makefile) by default.

-- 
~/.signature is: umop ap!sdn    (Frank Nobis)


reply via email to

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