emacs-devel
[Top][All Lists]
Advanced

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

Proposal for shell completion in M-x shell RET


From: David Kastrup
Subject: Proposal for shell completion in M-x shell RET
Date: Mon, 10 Sep 2007 14:44:56 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

Hi,

it turns out that when using bash's programmable completion, the
results are typically much better than Emacs' completion.  Since it is
unfeasible to mimic or interpret the wealth of shell-completion
scripts in Emacs, I would propose making it configurable to use the
shell completion instead.

The way this would work would be when TAB is pressed to send the
partial line up to the cursor as input to the shell, followed by TAB,
then capture the output from bash and interpret it (either inserting
completed output, or offering a completion menu).  When committing a
line (or pressing TAB), when the partial line already submitted does
not correspond with the one in the shell command line, the line is
erased and committed fresh, otherwise only the rest of the line is
submitted.

This approach would have the advantage of leaving no trace of the
completion in the shell history unless a command is actually sent to
the shell.

It should also work with other shells.

-- 
David Kastrup




reply via email to

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