unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Proposal for shell completion in M-x shell RET
@ 2007-09-10 12:44 David Kastrup
  2007-09-10 13:21 ` Andreas Schwab
  2007-09-10 14:19 ` Stefan Monnier
  0 siblings, 2 replies; 11+ messages in thread
From: David Kastrup @ 2007-09-10 12:44 UTC (permalink / raw)
  To: emacs-devel


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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-09-10 23:55 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-10 12:44 Proposal for shell completion in M-x shell RET David Kastrup
2007-09-10 13:21 ` Andreas Schwab
2007-09-10 13:56   ` David Kastrup
2007-09-10 14:03     ` Andreas Schwab
2007-09-10 14:10       ` David Kastrup
2007-09-10 14:19 ` Stefan Monnier
2007-09-10 14:29   ` Stefan Monnier
2007-09-10 14:52     ` David Kastrup
2007-09-10 15:51       ` Andreas Schwab
2007-09-10 23:55       ` Richard Stallman
2007-09-10 14:30   ` David Kastrup

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).