Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: weird behaviour
- X-seq: zsh-users 21527
- From: "Nikolay Aleksandrovich Pavlov (ZyX)" <kp-pav@xxxxxxxxx>
- To: david sowerby <d_sowerby@xxxxxxxxx>, "zsh-users@xxxxxxx" <zsh-users@xxxxxxx>
- Subject: Re: weird behaviour
- Date: Mon, 09 May 2016 23:04:02 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1462824243; bh=BsEjgRmkUk5RMtfv/T/QIDFABfY3T45xMJZyJSpRZqI=; h=From:To:In-Reply-To:References:Subject:Date; b=LEaey4gFj2KgESALzMcKsRMSoArNRXmfq4e9kg+1mOvxHDbTs/s5MLrYA6S9sjn6o fa+D4Dj/X66bTvIbkW4NVQF4cCpRyH1xfFOh0p3sVK3Ki37rVTKDstMBPTv9vg3M8q XgeW+ID1QVBKYs/twQQkxIe7lLdlttHp8ZeX2YfI=
- In-reply-to: <670153790.1038299.1462818842516.JavaMail.yahoo@mail.yahoo.com>
- 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: <670153790.1038299.1462818842516.JavaMail.yahoo.ref@mail.yahoo.com> <670153790.1038299.1462818842516.JavaMail.yahoo@mail.yahoo.com>
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