diff options
| author | nia <nia@NetBSD.org> | 2022-08-18 14:10:05 +0000 |
|---|---|---|
| committer | nia <nia@NetBSD.org> | 2022-08-18 14:10:05 +0000 |
| commit | f895037944c0b52ec6a2833c0e793bb4fb96221f (patch) | |
| tree | 92db927c9717a8f65cb1258d5d80bfb95b2f0fe5 /bin | |
| parent | f98f2916377f652e5c35103d6efb9b68c248e2ed (diff) | |
sh(1): Allow an explicit set -o vi or set -o emacs to override ~/.editrc
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/sh/histedit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/sh/histedit.c b/bin/sh/histedit.c index c9df2c3c91f..19715de40d1 100644 --- a/bin/sh/histedit.c +++ b/bin/sh/histedit.c @@ -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 @@ bad: } 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; |
