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

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

Re: Passing tab to inferiors shell in Shell mode


From: PT
Subject: Re: Passing tab to inferiors shell in Shell mode
Date: 24 Feb 2006 12:35:11 -0800
User-agent: G2/0.2

Barry Margolin wrote:
> In article <1140763831.980129.168280@p10g2000cwp.googlegroups.com>,
>
> The problem is that shell-mode is NOT a video terminal emulator.  Even
> if you send TAB, the shell you're sending to won't be able to do all the
> cursor control to display completions -- the escape sequences will just
> show up as literal characters in the buffer.
>

I think I figured out what to do in theory:

When tab is pressed a raw tab character is to be sent to the inferior
shell (I found a code snippet which does this). The inferior shell
performs the completion and displays the possible candidates. The
displayed list is saved and removed from the shell buffer, otherwise it
would be considered part of the input for the next command.

Then the saved list is parsed and a completion buffer is popped up for
the user to select a completion (like in case of file completion), The
selected completion is then inserted back to the buffer.

Of course, there will be a bit of flickering when the inferior shell
writes its output and it is removed from the shell buffer, but it's not
a great price for better completion.

The only thing left is to implement the whole thing. :)



reply via email to

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