zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: easy calling of associative array?
Date: Mon, 02 Nov 2015 15:01:58 -0800	[thread overview]
Message-ID: <5637EB66.9050301@eastlink.ca> (raw)
In-Reply-To: <151102130518.ZM17830@torch.brasslantern.com>

On 11/02/2015 01:05 PM, Bart Schaefer wrote:
> } >        typeset -g "${1}[$2]=$3"	# quotes so [ ] isn't globbing

> In the above,
>
>      set_v ary idx val
>
> is going to invoke
>
>      typeset -g ary[idx]=val
>
> Ordinarly "typeset" inside a function body behaves like "local".  The
> -g option tells it not to do that, so that the name "ary" is taken to
> come from the calling context instead of the current function context.

I don't understand. The idea of context here is new to me.  Why is 'ary' 
not a variable
like any other?
> } BTW, as a point of list etiquette:  Responding to most posts I let my
> } lines wrap
> } but resonding to yours, which seem to alway have fixed line width, I try to
> } match that style, but looking at the returned posts from the list, they
> } sometimes
> } sproing badly. Should I  try to keep to your width, or just let lines wrap?
>
> The above is what your text would look like if I didn't run it through
> a reformatter.  It Used To Be that everyone assumed text should be
> folded to be readable on an 80-column display, which, as a guy still
> using the email program I wrote myself 20 years ago, I still do.  Then
> along came HTML format email, and everybody assumed text should never be
> wrapped at all (let the reader's UI deal with it).  Except there's still
> this pesky thing about mailing lists preferring plain text, so we end up
> with a hypbrid where text as you write it is folded to be readable at
> whatever your display width is set, but then it gets re-folded to 80
> when you send it -- except that it also keeps any real newlines you
> entered, so if you were actually trying to make it look nice, it ends
> up like the above instead.

Yes.  Very unfortunate.
>
> Exactly what you SHOULD do depends on what you're using to write your
> email.  In Thunderbird you should probably put literal line breaks only
> at the ends of paragraphs, and let it wrap other stuff as it wills.

Ok.  Gotta get a better program, I hate Tbird.
>


  reply	other threads:[~2015-11-02 23:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-01 23:12 Ray Andrews
2015-11-01 23:55 ` ZyX
2015-11-02  0:49   ` Ray Andrews
2015-11-02  3:08     ` Bart Schaefer
2015-11-02  3:33       ` Ray Andrews
2015-11-02  6:51         ` Bart Schaefer
2015-11-02 15:43           ` Ray Andrews
2015-11-02 16:28             ` Bart Schaefer
2015-11-02 18:32               ` Ray Andrews
2015-11-02 19:37                 ` ZyX
2015-11-02 22:10                   ` Bart Schaefer
2015-11-02 22:50                     ` Ray Andrews
2015-11-02 21:05                 ` Bart Schaefer
2015-11-02 23:01                   ` Ray Andrews [this message]
2015-11-03 15:57                     ` Bart Schaefer
2015-11-04 14:48                       ` Ray Andrews
2015-11-04 16:39                         ` Bart Schaefer
2015-11-04 18:31                           ` Ray Andrews
2015-11-02 19:33             ` ZyX
2015-11-02 23:04               ` Ray Andrews

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=5637EB66.9050301@eastlink.ca \
    --to=rayandrews@eastlink.ca \
    --cc=zsh-users@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).