From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22563 invoked from network); 5 Apr 2004 15:49:18 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 5 Apr 2004 15:49:18 -0000 Received: (qmail 19018 invoked by alias); 5 Apr 2004 15:49:03 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19729 Received: (qmail 19006 invoked from network); 5 Apr 2004 15:49:02 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 5 Apr 2004 15:49:02 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [130.225.247.86] by sunsite.dk (MessageWall 1.0.8) with SMTP; 5 Apr 2004 15:49:2 -0000 Received: (qmail 9711 invoked from network); 5 Apr 2004 15:49:02 -0000 Received: from deliver.epitech.net (163.5.0.25) by a.mx.sunsite.dk with SMTP; 5 Apr 2004 15:49:00 -0000 Received: from epita.fr ([10.42.1.60]) by deliver.epitech.net (SAVSMTP 3.1.2.35) with SMTP id M2004040517450521368 ; Mon, 05 Apr 2004 17:45:05 +0200 Received: from bam (bam.epita.fr [10.42.14.31]) by epita.fr id i35FmEK25618 Mon, 5 Apr 2004 17:48:14 +0200 (CEST) Date: Mon, 5 Apr 2004 17:48:16 +0200 From: Jean Chalard To: zsh-workers@sunsite.dk Cc: Thorsten Kampe Subject: Re: .zshrc sanity check Message-ID: <20040405154816.GA19743@epita.fr> References: <1gyr312onv6xj$.dlg@thorstenkampe.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <1gyr312onv6xj$.dlg@thorstenkampe.de> User-Agent: Mutt/1.4i X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 > Just to make myself clear: I'm not looking for an "in-depth analysis", > just a quick "overhaul" like... I'm sorry I won't really give you the feedback that you ask for, but this reminds me of something I wanted to submit a long time ago. You bind history-beginning-search-backward on the up key. While I find this really useful (and I don't even imagine using my shell without this kind of binding, though I use history-search-backward), this has the drawback that the up arrow doesn't work as expected any more in zed sessions. It seems to me that many people like this binding, too. So I had a look at the source of zed, and wrote a little patch to fix this behaviour. I'm not sure whether zed should be the one doing that, if it should be done elsewhere or if my configuration is at fault, but I think many zed users would benefit from this. Sure, I wrote the patch several months ago, but the code of zed doesn't seem to have changed since then. And, er... It seems I used \e[A and \e[B for up and down keys. There is probably a more portable way to do this that I do not know about, isn't there? --- zed Mon Apr 2 12:04:05 2001 +++ J/zed Fri Aug 8 17:54:12 2003 @@ -25,7 +25,7 @@ zstyle ":completion:zed:*" insert-tab yes =20 # catch interrupts -cleanup=3D"$(bindkey -L "^M"; bindkey -L -M emacs "^X^W"; bindkey -aL "ZZ" +cleanup=3D"$(bindkey -L "^M"; bindkey -L -M emacs "^X^W"; bindkey -aL "ZZ"= ; bindkey -L "=1B[A"; bindkey -L "=1B[B"; echo "trap - INT EXIT"; trap)" trap "return 130" INT trap "$cleanup" EXIT @@ -37,6 +37,8 @@ # Depending on your stty's, you may be able to use ^J as accept-line, else: bindkey -M emacs "^X^W" accept-line bindkey -a "ZZ" accept-line +bindkey "=1B[A" up-line-or-history +bindkey "=1B[B" down-line-or-history =20 if ((fun)) then var=3D"$(functions $1)" --=20 J "Pour le jeune, de l'eau, =E9videmment !"