On 6/19/06, Martin Schaffstall <martin.schaffstall at googlemail.com> wrote:
> On 6/19/06, Josh Hurst <joshhurst at gmail.com> wrote:
> > On 6/19/06, Mario DeFazio <Mario.DeFazio at morganstanley.com> wrote:
> > > Could this not be solved with a new 'set' flag?
> > >
> > >     set -o tabtabcomp
> > >
> > > This would always treat TAB-TAB as a completion request.
> > > Just wonderin'...
> > Yeah but there is already such a flag: -o gmacs
> >
> > The gmacs mode is currently almost identical to the emacs mode except
> > one or two details but I think that making TAB and TABTAB always a
> > completion request is a good thing to add to the gmacs mode as the
> > idea came from the GNU people - and is considered as one of the most
> > user friendly features of the bash shell.
>
> Sounds good to me. I'll try to figure out how I can test for the gmacs
> mode and file a new patch then

And here is the patch:
---------------------------------------------------------------
diff -u -r orig/src/cmd/ksh93/edit/emacs.c src/cmd/ksh93/edit/emacs.c
--- orig/src/cmd/ksh93/edit/emacs.c     2006-06-22 16:50:04.000000000 +0200
+++ src/cmd/ksh93/edit/emacs.c  2006-06-22 16:50:03.000000000 +0200
@@ -329,7 +329,7 @@
                        continue;
 #endif /* u370 */
                case '\t':
-                       if(cur>0 && cur>=eol && out[cur-1]!='\t' &&
out[cur-1]!=' ' && ep->ed->sh->nextprompt)
+                       if((cur>0 && cur>=eol && out[cur-1]!='\t' &&
out[cur-1]!=' ' && ep->ed->sh->nextprompt)||sh_isoption(SH_GMACS))
                        {
                                if(ep->ed->e_tabcount==0)
                                {
Only in src/cmd: Makefile
---------------------------------------------------------------

-- 
     //   Martin Schaffstall
    //    EMail: martin.schaffstall at googlemail.com
\\ //
 \X/

Reply via email to