zsh-users
 help / color / mirror / code / Atom feed
From: Frank Terbeck <ft@bewatermyfriend.org>
To: Javier Marcet <jmarcet@gmail.com>
Cc: zsh-users@zsh.org
Subject: Re: Cursor position in shell history
Date: Sun, 12 Feb 2012 22:27:44 +0100	[thread overview]
Message-ID: <87bop3agj3.fsf@ft.bewatermyfriend.org> (raw)
In-Reply-To: <loom.20120212T181438-711@post.gmane.org> (Javier Marcet's message of "Sun, 12 Feb 2012 17:21:55 +0000 (UTC)")

Javier Marcet 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 profile
> nor the global zsh settings  (/etc/zsh) contain anything which me causing
> it.

Oh but it does. It's the global zshrc:

[...]
[[ -z "$terminfo[cuu1]" ]] || bindkey -M viins "$terminfo[cuu1]" vi-up-line-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.

FWIW, there is a bug about this in Debian's BTS:

  <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=383737>

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.

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.

Regards, Frank


  reply	other threads:[~2012-02-12 21:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-12 17:21 Javier Marcet
2012-02-12 21:27 ` Frank Terbeck [this message]
2012-02-12 22:59   ` Javier Marcet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bop3agj3.fsf@ft.bewatermyfriend.org \
    --to=ft@bewatermyfriend.org \
    --cc=jmarcet@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).