zsh-workers
 help / color / mirror / code / Atom feed
From: Joel Elkins <joel@elkins.co>
To: zsh-workers@zsh.org
Subject: bug with %<< prompt expansion
Date: Fri, 26 Sep 2014 18:27:35 -0500	[thread overview]
Message-ID: <CACPkN-ONVBHyFr8nB0j7+bkMBGP8qO25AASHh34gpXE=RwAuCA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 362 bytes --]

Hello. I think there may be a bug in the truncation operator %>> in the
prompt expansion code. It seems to count a sequence surrounded by %{ %} as
having width = 1, as shown below.

% echo $ZSH_VERSION
5.0.6
% print -P "%4>.>12345"
123.
% print -P "%4>.>1%{%}2345"
12.

In my opinion, these two commands should have the same output.

Thanks,

-- 
Joel D. Elkins

             reply	other threads:[~2014-09-26 23:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-26 23:27 Joel Elkins [this message]
2014-09-27  4:39 ` Bart Schaefer
2014-09-28 13:40   ` Joel Elkins

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='CACPkN-ONVBHyFr8nB0j7+bkMBGP8qO25AASHh34gpXE=RwAuCA@mail.gmail.com' \
    --to=joel@elkins.co \
    --cc=zsh-workers@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).