<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to bugs</title><link href="https://sourceforge.net/p/zsh/bugs/" rel="alternate"/><link href="https://sourceforge.net/p/zsh/bugs/feed.atom" rel="self"/><id>https://sourceforge.net/p/zsh/bugs/</id><updated>2013-02-01T15:04:37.597000Z</updated><subtitle>Recent changes to bugs</subtitle><entry><title>#89 zsh expands command substitutions incorrectly in local statements</title><link href="https://sourceforge.net/p/zsh/bugs/89/?limit=25#7973" rel="alternate"/><published>2013-02-01T15:04:37.597000Z</published><updated>2013-02-01T15:04:37.597000Z</updated><author><name>Peter Stephenson</name><uri>https://sourceforge.net/u/pws/</uri></author><id>https://sourceforge.net9ee99505a97c363c52d777b41d7bf24aae563b19</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The one thing Bart didn't point out is that there is an option to get (at least approximately) the behaviour you expect, namely KSH_TYPESET (from the shell and command where this difference was first encountered).  Not surprisingly this is set when emulating POSIX-style shells.  It doesn't make commands like "local" syntactically special other than for word splitting, however: you still can't assign arrays there, for example.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#89 zsh expands command substitutions incorrectly in local statements</title><link href="https://sourceforge.net/p/zsh/bugs/89/?limit=25#b0cd" rel="alternate"/><published>2013-02-01T04:13:14.957000Z</published><updated>2013-02-01T04:13:14.957000Z</updated><author><name>Bart Schaefer</name><uri>https://sourceforge.net/u/barts/</uri></author><id>https://sourceforge.netbbd380b571f64afb9fe6981eb9f17d5515f83f8a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;: open --&amp;gt; closed-wont-fix&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;milestone&lt;/strong&gt;: feature_requests --&amp;gt; dead&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</summary></entry><entry><title>#89 zsh expands command substitutions incorrectly in local statements</title><link href="https://sourceforge.net/p/zsh/bugs/89/?limit=25#dd80" rel="alternate"/><published>2013-02-01T04:07:49.354000Z</published><updated>2013-02-01T04:07:49.354000Z</updated><author><name>Bart Schaefer</name><uri>https://sourceforge.net/u/barts/</uri></author><id>https://sourceforge.netd33b75839cf6924e66a5e94103f65f5a856d8747</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;"local" is not included in the POSIX spec (not that it would matter to native zsh mode whether it was).  So whatever you're calling "POSIX shell" isn't strictly one.  However:&lt;/p&gt;
&lt;p&gt;Some shells treat "local" &lt;span&gt;[and "typeset"]&lt;/span&gt; as a special syntactic element and therefore treat any arguments that follow it as assignment syntax.  Zsh is not one of those shells; the arguments to "local" are just normal command-line arguments like those to any other command.  This is why, for example, you can't write&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;local&lt;/span&gt; &lt;span class="n"&gt;ary&lt;/span&gt;&lt;span class="p"&gt;=(&lt;/span&gt;&lt;span class="n"&gt;array&lt;/span&gt; &lt;span class="n"&gt;assignment&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;among other things.&lt;/p&gt;
&lt;p&gt;$(...) is always substituted as an array, which is why your first example behaves as it does.  In assignment contexts, arrays assigned with scalar syntax are joined, which is why your second example behaves as it does.&lt;/p&gt;
&lt;p&gt;In the third example, $foo is a scalar, and zsh does not split scalar variable references on whitespace when expanding.  If you tried instead&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;foo&lt;/span&gt;&lt;span class="p"&gt;=(&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;local&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;$&lt;span class="n"&gt;foo&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;you would find it behaves like the first example.&lt;/p&gt;
&lt;p&gt;Your fourth example shouldn't need further explanation.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>zsh expands command substitutions incorrectly in local statements</title><link href="https://sourceforge.net/p/zsh/bugs/89/" rel="alternate"/><published>2013-01-31T21:51:52.513000Z</published><updated>2013-01-31T21:51:52.513000Z</updated><author><name>Stephen Hicks</name><uri>https://sourceforge.net/u/kupopo/</uri></author><id>https://sourceforge.net0141477d6e7ab2e97cdcf2c1ca6aed2b90b01b30</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;See the following script for an example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;local&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;$&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt; &amp;quot;&lt;span class="n"&gt;local&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="o"&gt;\&lt;/span&gt;$&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;\&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;  &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;=[&lt;/span&gt;$&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;\&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;  &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;=[&lt;/span&gt;$&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;\&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&amp;quot;
&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;=;&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;

&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;$&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt; &amp;quot;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="o"&gt;\&lt;/span&gt;$&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;\&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;  &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;=[&lt;/span&gt;$&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;\&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;  &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;=[&lt;/span&gt;$&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;\&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&amp;quot;
&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;=;&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;

&lt;span class="n"&gt;foo&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&amp;quot;&lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&amp;quot;
&lt;span class="n"&gt;local&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;$&lt;span class="n"&gt;foo&lt;/span&gt;
&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt; &amp;quot;&lt;span class="n"&gt;foo&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="o"&gt;\&lt;/span&gt;&amp;quot;&lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="o"&gt;\&lt;/span&gt;&amp;quot;&lt;span class="o"&gt;\&lt;/span&gt;&lt;span class="n"&gt;nlocal&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="o"&gt;\&lt;/span&gt;$&lt;span class="n"&gt;foo&lt;/span&gt;&lt;span class="o"&gt;\&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;  &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;=[&lt;/span&gt;$&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;\&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;  &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;=[&lt;/span&gt;$&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;\&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&amp;quot;
&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;

&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;$&lt;span class="n"&gt;foo&lt;/span&gt;
&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt; &amp;quot;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="o"&gt;\&lt;/span&gt;$&lt;span class="n"&gt;foo&lt;/span&gt;&lt;span class="o"&gt;\&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;  &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;=[&lt;/span&gt;$&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;\&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;  &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;=[&lt;/span&gt;$&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;\&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&amp;quot;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;These should all result in the same thing (a=&lt;span&gt;[b c=d]&lt;/span&gt; c=[]), and in fact do in POSIX sh (although it needs to be wrapped in a function for local to work).  But in zsh, the first version outputs a=&lt;span&gt;[b]&lt;/span&gt; c=&lt;span&gt;[d]&lt;/span&gt;.  But this is not even internally consistent, since the other permutations all expand to a single word.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>zsh expands command substitutions incorrectly in local statements</title><link href="https://sourceforge.net/p/zsh/bugs/89/" rel="alternate"/><published>2013-01-31T21:51:52.513000Z</published><updated>2013-01-31T21:51:52.513000Z</updated><author><name>Stephen Hicks</name><uri>https://sourceforge.net/u/kupopo/</uri></author><id>https://sourceforge.netc7d72b27b0843f6776e64aecb61231ee22da2d0b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Ticket 89 has been modified: zsh expands command substitutions incorrectly in local statements&lt;br /&gt;
Edited By: Bart Schaefer (barts)&lt;br /&gt;
Status updated: u'open' =&amp;gt; u'closed-wont-fix'&lt;br /&gt;
_milestone updated: u'feature_requests' =&amp;gt; u'dead'&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#87 ZSH crash during tab completion</title><link href="https://sourceforge.net/p/zsh/bugs/87/?limit=250#88be" rel="alternate"/><published>2013-01-27T00:48:45.023000Z</published><updated>2013-01-27T00:48:45.023000Z</updated><author><name/><uri>https://sourceforge.net</uri></author><id>https://sourceforge.netb03af93743c07b5c6489fd522698fc9493d00840</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Opps, sorry, forgot I had made my zshrc mostly redundant by using grml-zsh-config as my systems zsh config (installed via archlinux repos)&lt;/p&gt;
&lt;p&gt;My zsh version is zsh 5.0.2 (x86_64-unknown-linux-gnu)&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#88 Can't create a RW local copy of KEYMAP</title><link href="https://sourceforge.net/p/zsh/bugs/88/?limit=25#6787" rel="alternate"/><published>2013-01-26T22:54:40.136000Z</published><updated>2013-01-26T22:54:40.136000Z</updated><author><name>ELIPTUS</name><uri>https://sourceforge.net/u/eliptus/</uri></author><id>https://sourceforge.net90cca0a49d9989658b8e9c39a30b146da134c508</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Appreciate the workaround.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#88 Can't create a RW local copy of KEYMAP</title><link href="https://sourceforge.net/p/zsh/bugs/88/?limit=25#86e5" rel="alternate"/><published>2013-01-26T22:50:40.145000Z</published><updated>2013-01-26T22:50:40.145000Z</updated><author><name>Bart Schaefer</name><uri>https://sourceforge.net/u/barts/</uri></author><id>https://sourceforge.net92acd51b6442bec3aacbca5dcda2238bd6b0e5b4</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;: open --&amp;gt; closed-wont-fix&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;assigned_to&lt;/strong&gt;: Bart Schaefer&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</summary></entry><entry><title>#88 Can't create a RW local copy of KEYMAP</title><link href="https://sourceforge.net/p/zsh/bugs/88/?limit=25#3add" rel="alternate"/><published>2013-01-26T22:49:23.247000Z</published><updated>2013-01-26T22:49:23.247000Z</updated><author><name>Bart Schaefer</name><uri>https://sourceforge.net/u/barts/</uri></author><id>https://sourceforge.net35e2af10506b9b736afbe7428c5b82f9cc7d6631</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;This has to do with the semantics of ZLE parameters.  They're implicitly already local to the widget, so you can't make them local again in the same scope.  Workaround is to use an anonymous function scope:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;zle-keymap-select()
{
  (){
    local -h +r KEYMAP=&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;KEYMAP&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;
    : ...
  }
}
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>#87 ZSH crash during tab completion</title><link href="https://sourceforge.net/p/zsh/bugs/87/?limit=25#b341" rel="alternate"/><published>2013-01-26T22:32:27.582000Z</published><updated>2013-01-26T22:32:27.582000Z</updated><author><name>Bart Schaefer</name><uri>https://sourceforge.net/u/barts/</uri></author><id>https://sourceforge.net957d63f7654f8a359da4dd54939dffa2f167254f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;What version of zsh?  I tested with 5.0.2 and with a build from just before the 5.0 release.&lt;/p&gt;
&lt;p&gt;The attached .zshrc is almost entirely commented out, except for a few alias assignments, so if that's really accurate it's unlikely to be related.  Has compinit been run by some other startup file (/etc/zsh* or the like)?&lt;/p&gt;
&lt;p&gt;I'm unable to reproduce the crash.  With compinit run, I get offered files at that command line position.  With compctl, I get nothing (no error, no beep, no completions), so if in the reported example compinit has not been run I suspect a platform-specific bug in the old code.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>