Source-Changes-HG archive

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

[src/trunk]: src/bin/sh sh(1): Allow an explicit set -o vi or set -o emacs to...



details:   https://anonhg.NetBSD.org/src/rev/481de8d192e9
branches:  trunk
changeset: 369453:481de8d192e9
user:      nia <nia%NetBSD.org@localhost>
date:      Thu Aug 18 14:10:05 2022 +0000

description:
sh(1): Allow an explicit set -o vi or set -o emacs to override ~/.editrc

diffstat:

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

diffs (31 lines):

diff -r a79b60943487 -r 481de8d192e9 bin/sh/histedit.c
--- a/bin/sh/histedit.c Thu Aug 18 12:25:32 2022 +0000
+++ b/bin/sh/histedit.c Thu Aug 18 14:10:05 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: histedit.c,v 1.62 2022/08/17 22:27:17 nia Exp $        */
+/*     $NetBSD: histedit.c,v 1.63 2022/08/18 14:10:05 nia 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.62 2022/08/17 22:27:17 nia Exp $");
+__RCSID("$NetBSD: histedit.c,v 1.63 2022/08/18 14:10:05 nia Exp $");
 #endif
 #endif /* not lint */
 
@@ -176,11 +176,11 @@
                }
                if (el) {
                        INTOFF;
+                       el_source(el, lookupvar("EDITRC"));
                        if (Vflag)
                                el_set(el, EL_EDITOR, "vi");
                        else if (Eflag)
                                el_set(el, EL_EDITOR, "emacs");
-                       el_source(el, lookupvar("EDITRC"));
                        el_set(el, EL_BIND, "^I", 
                            tabcomplete ? "rl-complete" : "ed-insert", NULL);
                        INTON;



Home | Main Index | Thread Index | Old Index