zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Re: Read-only variables in emulation mode
Date: Mon, 15 Jun 2015 20:24:31 -0700	[thread overview]
Message-ID: <150615202431.ZM25744@torch.brasslantern.com> (raw)
In-Reply-To: <CAHYJk3QtwxXabmsuYz_D-EcWSkmhLn_XWkPUnhiOU7VDdZLTPg@mail.gmail.com>

On Jun 16,  2:10am, Mikael Magnusson wrote:
}
} % echo hi; _=foo; echo $_
} hi
} hi

That's actually a bug -- the assignment _=foo should erase $_ , I think.

} % for _ in a b c; do echo $_ hi; done
} hi
} hi hi
} hi hi
} 
} I'm not sure if this is better than printing a warning that $_ is
} readonly. :)

If you go back to the original message in the thread, the whole point
was to use $_ as a dummy variable that didn't need to be declared and
whose value was instantly discarded.  For that purpose, the warning is
extraneous.

Admittedly that's a pretty constrained use case.


  reply	other threads:[~2015-06-16  3:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-16 19:10 Øystein Walle
2013-12-16 19:40 ` Bart Schaefer
2013-12-18  6:36   ` Bart Schaefer
2013-12-18 19:28     ` Peter Stephenson
2013-12-19  7:57       ` Bart Schaefer
2015-06-16  0:10         ` Mikael Magnusson
2015-06-16  3:24           ` Bart Schaefer [this message]
2015-06-16  6:24             ` Mikael Magnusson
2015-06-16 15:54               ` Bart Schaefer
2015-06-16 21:06                 ` Mikael Magnusson
2015-06-16 19:05             ` Bart Schaefer

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=150615202431.ZM25744@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).