From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27601 invoked by alias); 12 Feb 2012 23:00:20 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16758 Received: (qmail 24480 invoked from network); 12 Feb 2012 23:00:19 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.214.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=WmhQuMplPmTkyuKpxAFdr/S++ix3O4Qoo9d8u+5/HuI=; b=UDF8Hblndl0P57GIsDyDbMEAPcdxtFZ/rFCz6sBTG4bJwZXTZc8Wtbg7TokI4O80bQ vdnK/AyoGzvCsgkKXu9GZ7clN/ADfX4gpbdDCvSdwcoFc+LQzQmscTBJmzHdEWCuw2fq 99d22oFtQJcfNrFwJ/afVBnMzAKZ2lvKQ+FQI= MIME-Version: 1.0 In-Reply-To: <87bop3agj3.fsf@ft.bewatermyfriend.org> References: <87bop3agj3.fsf@ft.bewatermyfriend.org> From: Javier Marcet Date: Sun, 12 Feb 2012 23:59:51 +0100 Message-ID: Subject: Re: Cursor position in shell history To: Frank Terbeck Cc: zsh-users@zsh.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sun, Feb 12, 2012 at 22:27, Frank Terbeck wrote= : >> Last month I set up an Ubuntu based system, where I use zsh, as in all >> the unix systems I manage. There is one thing which is driving me mad. >> When I use the 'up arrow' to move through shell's history, the cursor is >> placed at the start of the line instead of at the end. This only happens >> in Ubuntu. > Yes. Ubuntu basically uses the package from debian, which causes this. >> I use the same .zsh folder with my settings and neither the global profi= le >> nor the global zsh settings =C2=A0(/etc/zsh) contain anything which me c= ausing >> it. > Oh but it does. It's the global zshrc: > [...] > [[ -z "$terminfo[cuu1]" ]] || bindkey -M viins "$terminfo[cuu1]" vi-up-li= ne-or-history > [[ -z "$terminfo[kcuu1]" ]] || bindkey -M viins "$terminfo[kcuu1]" vi-up-= line-or-history > [...] > There is more of this stuff in there. Change it to your liking. Oh damn it, I thought I checked everything but you're absolutely right. > FWIW, there is a bug about this in Debian's BTS: > =C2=A0 > The position of the maintenance team so far is: It was changed to more > vi-ish, and up to that point *two* people bothered to tell the > maintainer. So it stays. But it is not vi-ish either, if it were, the cursor would stay at the same position, not always go to column 0. > My current view is this (/me puts his debian hat on): Move to a proper > way based on $terminfo entirely to setup keys. That way everything below > the "ncurses fogyatekos" comment can go away, too. Because it's really > not the fault of ncurses that some value may be off here (but that's not > relevant here - so I'll drop that thought). > Such a move will probably cause some breakage, but is the right thing to > do. And since we'll break something anyway, I think we should get rid of > those bindings, as well, and let the user decide whether or not he wants > them or not. Well, the way I see it is that on anything not Debian based, I never ever s= aw that behavior. Be it Linux, BSD, or whatever. Although I also find hard to believe only two people have complained. Anyway, _thanks_ a lot, this has been bothering me since I first installed = that Ubuntu machine. --=20 Javier Marcet