Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: weird behaviour
- X-seq: zsh-users 21528
- From: david sowerby <d_sowerby@xxxxxxxxx>
- To: "Nikolay Aleksandrovich Pavlov (ZyX)" <kp-pav@xxxxxxxxx>
- Subject: Re: weird behaviour
- Date: Mon, 9 May 2016 20:33:59 +0000 (UTC)
- Cc: <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1462826040; bh=bL+KUAmYkNJN/2SD5X+eXrMhtT4dXgP2wUJoOAnhMuU=; h=Date:From:Reply-To:To:Cc:Subject:References:From:Subject; b=JZDLH+lnvanwd8XZU9qV4tQIPq6H2tilP3y5bvs4nOrbCmiYvhHdRvfpNCEfqxL51paYTJYGvblHidwStbJs2oh97euSy3asBoQCgaENKJ9gdeeAff/7KRLkCVJcuFAbWX+VsG/wezy6RgfdLea+gp9KfN8IwCk5MoNKIm99VqKVVzbmAhrFnzaGPpu4JxjiCgNzoRQ6wUuTxw0nQ41XRP+vTkNT2uq5YMB0rD7NQKYjLzbPSU44U0ysEzglbziyHEJOhwGEYiEuogM06Y06pudvvjmyOLTs2IZpYLHOcLOUUAcRD68sdz7glNLDwmvaMjoUfetCk2nxmnWtN84SKQ==
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <2078594247.1137691.1462826039528.JavaMail.yahoo.ref@mail.yahoo.com>
- Reply-to: david sowerby <d_sowerby@xxxxxxxxx>
Thanks for the quick reply. I did think about the PS1 being a problem. Everything is surrounded with
%{ %}. I'll try a more basic prompt and let you know. -----------------------------dave
====================================================
Morality is doing what is right, no matter what you are told.
Religion is doing what you are told, no matter what is right.
H.L. Mencken
--------------------------------------------
On Mon, 5/9/16, Nikolay Aleksandrovich Pavlov (ZyX) <kp-pav@xxxxxxxxx> wrote:
Subject: Re: weird behaviour
To: "david sowerby" <d_sowerby@xxxxxxxxx>, "zsh-users@xxxxxxx" <zsh-users@xxxxxxx>
Date: Monday, May 9, 2016, 1:04 PM
09.05.2016, 21:40,
"david sowerby" <d_sowerby@xxxxxxxxx>:
>
I noticed recently that when I <tab> to complete zsh
doubles the first letter of the command eg:
> % cd T <tab> expands to TV - as
expected and the expansion works as normal - unless there
are more than one choice when it does this
> % ccd /TV/TV/ARROW/ with the multiple dirs
shown below as expected
> This
doesn't affect the command at all, and if I backspace I
can't remove the first 'c', and if I then hit
<enter> nothing happens ie as if the command
'c' isn't there.
> I'm
using 5.0.7 (Debian 8) in urvxt. I also tested in xterm and
get the same result, strangely it doesn't happen on a
console. I tried zsh -l in urxvt and get the same double
letter result, but in xterm it is fine! Running a bare
"compinit" without any extras doesn't make any
difference. Has anyone else noticed this? I'm baffled
:-/
>
------------------------------dave
>
>
====================================================
> Morality is doing what is right, no matter
what you are told.
> Religion is doing
what you are told, no matter what is right.
>
H.L.
Mencken
You clearly
have some problem with prompt. Most likely you forgot to
surround something in PS1 with %{ … %} and zsh was no
longer able to determine real prompt width. When you do
completion in some cases zsh needs to redraw command text in
which case it basically does “go to position {just after
the place where PS1 ends} and print ‘cd …’”. If
position is wrong you see what you see, but zsh still knows
that it needs to run “cd …” and not “ccd …”.
Except for missing %{ … %}
there is another possible reason for this: zsh thinks that
some character is double width, but terminal emulator thinks
it has single width. If this is the case I do not know how
to fix this cleanely (it is always possible to construct
some hack).
In any case you
need to check your PS1.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author