Fri Jan 7 22:21:56 2011 UTC ()
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.


(jmmv)
diff -r1.41 -r1.42 src/bin/sh/histedit.c

cvs diff -r1.41 -r1.42 src/bin/sh/histedit.c (expand / switch to context diff)
--- src/bin/sh/histedit.c 2008/02/13 12:57:16 1.41
+++ src/bin/sh/histedit.c 2011/01/07 22:21:56 1.42
@@ -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;