zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: Fwd: [Pkg-zsh-devel] Bug#793168: zsh: expand-substitution-on-TAB broke for $(()) in 5.0.8 [origin: adi@hexapodia.org]
Date: Sat, 25 Jul 2015 11:54:19 -0700	[thread overview]
Message-ID: <150725115419.ZM2876@torch.brasslantern.com> (raw)
In-Reply-To: <20150725170340.GY2433@sym.noone.org>

On Jul 25,  7:03pm, Axel Beckert wrote:
}
} I can also reproduce this issue with zsh 5.0.8 in Debian and can
} confirm, that it didn't happen with zsh 5.0.7 in Debian.
} 
} ----- Forwarded message from Andy Isaacson <adi@hexapodia.org> -----
} 
} with zsh 5.0.7 and earlier versions, if I type $((5*8)) and then hit TAB,
} the expression is replaced with its evaluation ("40" in this case).

This appears to be a difference in behavior of the expand-or-complete
built-in widget.  With _expand added to the completer zstyle or with
the expand-word widget, the behavior is unchanged.

There's no change to the widget itself.  The issue seems to be that
the completion system is examining $((5*8) [without the trailing paren] 
insead of the full expression.  You can see this in action if you
"setopt completealiases"; using "_" to represent the position of the
cursor:

torch% setopt completealiases
torch% echo $((5*8))_<TAB>
[... list of parameter names appears ...]
torch% echo $((5*8)_)

This must in turn be due to the change in the parser to disambiguate
"$((" as either math or command substitution; completion is trying it
as command substitution without looking ahead to see if it can be done
as math instead.


  reply	other threads:[~2015-07-25 18:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-25 17:03 Axel Beckert
2015-07-25 18:54 ` Bart Schaefer [this message]
2015-07-25 19:15 ` Peter Stephenson
2015-07-25 20:30   ` Peter Stephenson

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=150725115419.ZM2876@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --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).