Source-Changes-HG archive

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

[src/trunk]: src/bin/sh Call el_source before initializing sh-specific editli...



details:   https://anonhg.NetBSD.org/src/rev/eba10e9a504f
branches:  trunk
changeset: 760574:eba10e9a504f
user:      jmmv <jmmv%NetBSD.org@localhost>
date:      Fri Jan 07 22:21:56 2011 +0000

description:
Call el_source before initializing sh-specific editline properties (i.e.
the editor type and the tab completion binding).

This allows tab completion to work when a user has an ~/.editrc file.

Addresses PR bin/43404.

diffstat:

 bin/sh/histedit.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r 910671c205d6 -r eba10e9a504f bin/sh/histedit.c
--- a/bin/sh/histedit.c Fri Jan 07 19:54:48 2011 +0000
+++ b/bin/sh/histedit.c Fri Jan 07 22:21:56 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: histedit.c,v 1.41 2008/02/13 12:57:16 joerg Exp $      */
+/*     $NetBSD: histedit.c,v 1.42 2011/01/07 22:21:56 jmmv Exp $       */
 
 /*-
  * Copyright (c) 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)histedit.c 8.2 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: histedit.c,v 1.41 2008/02/13 12:57:16 joerg Exp $");
+__RCSID("$NetBSD: histedit.c,v 1.42 2011/01/07 22:21:56 jmmv Exp $");
 #endif
 #endif /* not lint */
 
@@ -149,13 +149,13 @@
                        INTON;
                }
                if (el) {
+                       el_source(el, NULL);
                        if (Vflag)
                                el_set(el, EL_EDITOR, "vi");
                        else if (Eflag)
                                el_set(el, EL_EDITOR, "emacs");
                        el_set(el, EL_BIND, "^I", 
                            tabcomplete ? "rl-complete" : "ed-insert", NULL);
-                       el_source(el, NULL);
                }
        } else {
                INTOFF;



Home | Main Index | Thread Index | Old Index