Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Strange behaviour in completion when prompt is colorized
- X-seq: zsh-users 12820
- From: "Mikael Magnusson" <mikachu@xxxxxxxxx>
- To: "Zsh Users" <zsh-users@xxxxxxxxxx>
- Subject: Re: Strange behaviour in completion when prompt is colorized
- Date: Sun, 4 May 2008 09:21:17 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=tQuTfL3QRZD9UTlZ3Dw5m01q1Xpqi7GS7NRgSD++y/Y=; b=sq8YbVXuLPebMetQDWaVfrCm/c3sPc8rjx/BF6vByBL2f5yseZW4fqvjARfx4dGoSgMWDg8rtaMoCkgyuZ6GBCrEGgtagA5Xhon0dYN2WzfKUj5biuyA9vH9prISosF23k+YmBzJaOL7C/MaOJJsbAeR3IkrY/nXz0SV3jH4hjE=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=KBeelmb7aOVHOLXkL0Rcw0HgBrxHZtH2ZGMkVnQeDFq53in5+KS7ooSBEVy2FTTas5LLftTp5JqGoCA1V/Ss6xo9JHsF0J5qxaoqm5hBJheMvev4RDvmmY5R8tk1pevzJ8OMUxYVLjIuuPvUUgQsz61sQx3XJO6ICNalZWE8vGU=
- In-reply-to: <d53cb3110805040018u1018d747s2fc80c1ffb9bfcb6@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <d53cb3110805040018u1018d747s2fc80c1ffb9bfcb6@xxxxxxxxxxxxxx>
2008/5/4 Gowtham M <gowthamgowtham@xxxxxxxxx>:
> Hi, While completing commands/filenames. zsh is inserting some spaces on
> the command-line. However, it lists down the possible matches also... How
> can
> I make it not insert these annoying spaces?
>
> For example, if I type pdf at the prompt and hit TAB,
> ~> pdf<TAB>
>
> The result is:
>
> ~> pdf _<-- The cursor is now here!
> pdf2dsc pdfetex pdfinfo pdfopt pdftops
> pdf2ps pdfevirtex pdfinitex pdfs@ pdftotext
> pdfeinitex pdffonts pdfjadetex pdftex pdfvirtex
> pdfelatex pdfimages pdflatex pdftopbm pdfxmltex
>
>
> This is happening only if I add colors to my prompt.
> PS1="$fg[default]$fg[red]%c$fg[default]> "
>
> I was using zsh 4.0.7 but this is same with zsh 4.3.6
>
> Thanks
> Gowtham
The problem is probably that you didn't wrap the color code sequences
in %{ and %} prompt escapes, which makes zsh think the prompt is wider
than it actually is, since the color escapes don't take up any space.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author