zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: uninvited members of associative array
Date: Fri, 16 Dec 2022 13:33:23 -0800	[thread overview]
Message-ID: <86b305e2-3ff0-cf5b-ac85-acfec1d48696@eastlink.ca> (raw)
In-Reply-To: <Y5zf2AKVWK04IxEh@localhost>


On 2022-12-16 13:15, Dominik Vogt wrote:
>
> But variables are not even a real part of the shell, the shell
> script or its data.  Every process has an associated environment
> that consists of "key=value" pairs.  The parameter syntax in the
> shell is just a way to manipulate the environment that is then
> passed to the started processes.  The environment exists
> independently of the shell.

Sure, but the shell manipulates that environment, which is what we want 
it to do.  And the various expansions are surely entirely zsh's own 
doing.  I don't think there's anything to disagree about really.  I do 
take your point tho.  zsh is not comparable to, say, C.  At first I 
thought it would be and it took a while to beat that out of me.

To begin with, the shell does not even have a fixed syntax that
> could be written down in a rule book:
I've noticed!  The parser code must be formidable.
> Then, the commands that the shell runs are mostly not defined by
> the shell but externally.  You'd probably describe the script
>
>    ls .
>    rm -f foobarbaz
>
> as "a program that lists non-hidden entries of the current
> directory and then removes the entry foobarbaz if it exists and is
> not a directory".  But that is not true.  What the script really
> does is "execute a program 'ls' with argument '.', then execute a
> program 'rm' with arguments '-f' 'foobarbaz'".  What the called
> programs do is not part of the shell.  So, unless you want to
> define the program as a sequence of "execute X with arguments Y1
> ... Yn" the shell really doesn't do anything close to what the
> "program" is supposed to do.

I understand.  The shell is for interacting with command line binaries 
and friends.  But it's internal power is such that it can get a whole 
lot done.  I remember in C when you had to call an external program it 
was ... 'unnatural', but of course zsh is exactly the opposite -- it is 
a facilitator of external programs.





  parent reply	other threads:[~2022-12-16 21:34 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-15 23:48 Ray Andrews
2022-12-16  0:05 ` Lawrence Velázquez
2022-12-16  0:48   ` Ray Andrews
2022-12-16  1:29     ` Lawrence Velázquez
2022-12-16  2:09     ` Dominik Vogt
2022-12-16  2:56       ` Ray Andrews
2022-12-16  3:21         ` Lawrence Velázquez
2022-12-16  4:16           ` Ray Andrews
2022-12-16 10:05             ` Dominik Vogt
2022-12-16 14:13               ` Ray Andrews
2022-12-16 15:19                 ` Dominik Vogt
2022-12-16 19:14                   ` Ray Andrews
2022-12-16 16:30                 ` Daniel Shahaf
2022-12-16 18:21                   ` Ray Andrews
2022-12-16 19:04                     ` Dominik Vogt
2022-12-16 20:10                       ` Ray Andrews
2022-12-16 21:15                         ` Dominik Vogt
2022-12-16 21:33                           ` Bart Schaefer
2022-12-16 21:59                             ` Dominik Vogt
2022-12-16 22:15                               ` Bart Schaefer
2022-12-16 23:33                                 ` Ray Andrews
2022-12-17 12:47                                   ` Pier Paolo Grassi
2022-12-17 17:32                                     ` Ray Andrews
2022-12-17 18:10                                 ` Ray Andrews
2022-12-17 18:19                                   ` Roman Perepelitsa
2022-12-17 20:31                                     ` Ray Andrews
2022-12-17 20:49                                       ` Bart Schaefer
2022-12-17 21:07                                       ` Lawrence Velázquez
2022-12-17 21:52                                         ` Ray Andrews
2022-12-17 22:10                                           ` Bart Schaefer
2022-12-17 23:41                                             ` Daniel Shahaf
2022-12-18  0:15                                             ` Ray Andrews
2022-12-18  0:25                                               ` Daniel Shahaf
2022-12-18  2:13                                                 ` Ray Andrews
2022-12-18 20:12                                                   ` Daniel Shahaf
2022-12-18 20:26                                                     ` Bart Schaefer
2022-12-18 20:41                                                       ` Ray Andrews
2022-12-18  3:44                                               ` Lawrence Velázquez
2022-12-17 23:25                                         ` Daniel Shahaf
2022-12-16 21:33                           ` Ray Andrews [this message]
2022-12-16 20:25                       ` Daniel Shahaf
2022-12-16 21:43                         ` Dominik Vogt
2022-12-16  3:20 ` Bart Schaefer
2022-12-16  4:15   ` Ray Andrews
2022-12-16  8:12 ` Roman Perepelitsa

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=86b305e2-3ff0-cf5b-ac85-acfec1d48696@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).