From owner-cvs-all Sun Jul 21 17:17:27 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5D4DB37B400; Sun, 21 Jul 2002 17:17:20 -0700 (PDT) Received: from dilbert.robbins.dropbear.id.au (020.a.009.mel.iprimus.net.au [210.50.112.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id F01D543E4A; Sun, 21 Jul 2002 17:16:48 -0700 (PDT) (envelope-from tim@robbins.dropbear.id.au) Received: from dilbert.robbins.dropbear.id.au (4c37ct1jru8en1yf@localhost [127.0.0.1]) by dilbert.robbins.dropbear.id.au (8.12.3/8.12.3) with ESMTP id g6M0FJEu064612; Mon, 22 Jul 2002 10:15:20 +1000 (EST) (envelope-from tim@dilbert.robbins.dropbear.id.au) Received: (from tim@localhost) by dilbert.robbins.dropbear.id.au (8.12.3/8.12.3/Submit) id g6M0E3nB064576; Mon, 22 Jul 2002 10:14:03 +1000 (EST) Date: Mon, 22 Jul 2002 10:14:02 +1000 From: Tim Robbins To: Jon Mini Cc: cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG Subject: Re: cvs commit: src/bin/sh sh.1 Message-ID: <20020722101402.A61422@dilbert.robbins.dropbear.id.au> References: <20020721180547.A29241@dilbert.robbins.dropbear.id.au> <20020721203021.D19918-100000@gamplex.bde.org> <20020721182928.GJ31134@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020721182928.GJ31134@elvis.mu.org>; from baka@elvis.mu.org on Sun, Jul 21, 2002 at 11:29:28AM -0700 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Jul 21, 2002 at 11:29:28AM -0700, Jon Mini wrote: > On Sun, Jul 21, 2002 at 08:43:56PM +1000, Bruce Evans wrote: > > Right. I have tried removing those things before, and nothing except them > > has made a very large difference for many years. libedit doesn't seem to > > be very well engineered (it seems to cause more bloat than libreadline > > despite being much smaller and doing less), but the getpwnam() bloat is > > much larger and harder to fix. > > I have long contended that the only thing keeping me from using sh as my > login shell full-time is one feature that libreadline has but libedit > lacks (^R -> reverse incremental history search). libedit actually does have this feature, but our sh(1) lacks a command to change the bindings. If you add this to builtins.def: bindcmd bind then put this in histedit.c: int bindcmd(int argc, char **argv) { return (el_parse(el, argc, argv)); } You can then type: set -o emacs bind ^R em-inc-search-prev This hack isn't entirely correct, it will just segfault if you try to use the `bind' command when line editing is disabled. editrc(5) documents how the bind command works. Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message