zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: path PATH
Date: Sat, 21 Jan 2023 10:53:11 -0800	[thread overview]
Message-ID: <3b93f68e-d090-15c0-c15e-a3d09d702f76@eastlink.ca> (raw)
In-Reply-To: <CAN=4vMo2=+xAHvE6qVmqGCggGkTkj0wbVj4m9o2gpN8dkOQiug@mail.gmail.com>


On 2023-01-21 09:01, Roman Perepelitsa wrote:
>
>> 3 /aWorking/Zsh/Source/Wk 1 $ set | grep  "^PATH"
>> PATH=.:/aWorking/Zsh/System:/aWorking/Bin:/usr/local/bin:/usr/sbin:/usr/bin
>>
>> 3 /aWorking/Zsh/Source/Wk 1 $ typeset -p PATH
>> export -T PATH path=( . /aWorking/Zsh/System /aWorking/Bin
>> /usr/local/bin /usr/sbin /usr/bin )
> Can you elaborate? Do you believe that these two commands should have
> identical output?
Yes.  Both would seem to be displaying values.  And in every case except 
PATH, that is exactly what happens.
>
> Does it bother you that in the following snippet the last two commands
> also don't have identical output?
>
>      % export -i8 BAR=42
>
>      % typeset -p BAR
>      export -i8 BAR=42
>
>      % env | grep BAR
>      BAR=8#52
>
> These are different commands and they have different output. Neither
> shows the "true" or "real" value of the parameter. `typeset -p` shows
> exactly and precisely what a zsh parameter is, while `env` shows the
> environment.

That's a bit Byzantine isn't it?  If 'env' displays the base of the 
number whereas typeset displays the command by which the base was 
forced, no I don't think that's a genuine comparison.  It's nothing the 
same as PATH displaying with spaces when in fact it has colons.  In your 
example one clearly anticipates the other; it's actually the same 
information just formatted differently.

Bart:

 > The definition of a tied parameter is that one of the pair is a 
scalar string with an internal delimiter defaulting to a colon, and the 
other is an array of the delimited values.  There's nothing magic about 
PATH in this respect.

Ah!  So now we're barking up the same tree.  But ... all the other tied 
parameters look like merely the same array with two different names.  
Have I made the wrong pattern?

...

Yes, I have:  set | grep FPATH  ... and what do I see but colons!

NUTS!  All the others, there's only one element so there's no chance for 
the colons to show up :(  they define as arrays, but there's actually 
just the one element so that's where I lost the scent.  I get it.  Many 
thanks.  So PATH is indeed unique but it isn't special :)




  reply	other threads:[~2023-01-21 18:54 UTC|newest]

Thread overview: 119+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-20 21:57 Ray Andrews
2023-01-20 22:20 ` Bart Schaefer
2023-01-21  2:23   ` Ray Andrews
2023-01-21  6:11     ` Lawrence Velázquez
2023-01-21 15:18       ` Ray Andrews
2023-01-21 15:25         ` Roman Perepelitsa
2023-01-21 16:21           ` Ray Andrews
2023-01-21 16:38             ` Roman Perepelitsa
2023-01-21 16:54               ` Ray Andrews
2023-01-21 17:01                 ` Roman Perepelitsa
2023-01-21 18:53                   ` Ray Andrews [this message]
2023-01-21 19:09                     ` Roman Perepelitsa
2023-01-21 20:50                       ` Ray Andrews
2023-01-21 21:11                         ` Roman Perepelitsa
2023-01-21 20:19                     ` Bart Schaefer
2023-01-21 20:26                       ` env arrays (was: Re: path PATH) zeurkous
2023-01-22 17:28                         ` Bart Schaefer
2023-01-21 21:03                       ` path PATH Ray Andrews
2023-01-21 21:52                         ` Lawrence Velázquez
2023-01-22  0:42                           ` Ray Andrews
2023-01-22 12:29                             ` Roman Perepelitsa
2023-01-22 14:17                               ` Ray Andrews
2023-01-22 16:15                                 ` Bart Schaefer
2023-01-22 17:23                                   ` Ray Andrews
2023-01-22 19:20                               ` Bart Schaefer
2023-01-22 19:31                                 ` Roman Perepelitsa
2023-01-22 19:51                                   ` Bart Schaefer
2023-01-22 19:56                                     ` Roman Perepelitsa
2023-01-22 20:03                                       ` Bart Schaefer
2023-01-22 21:56                                         ` Bart Schaefer
2023-01-22 22:02                                           ` Roman Perepelitsa
2023-01-22 22:27                                             ` Bart Schaefer
2023-01-22 23:03                                           ` Ray Andrews
2023-01-22 20:12                                       ` Ray Andrews
2023-01-22 21:11                                         ` Bart Schaefer
2023-01-22 22:44                                           ` Ray Andrews
2023-01-22 23:35                                             ` Lawrence Velázquez
2023-01-22 23:58                                               ` Ray Andrews
2023-01-23  0:49                                                 ` Lawrence Velázquez
2023-01-23  1:33                                                   ` Bart Schaefer
2023-01-23  1:49                                                     ` Lawrence Velázquez
2023-01-23  1:11                                             ` Bart Schaefer
2023-01-23  1:56                                               ` Ray Andrews
2023-01-23  2:59                                                 ` Lawrence Velázquez
2023-01-23  3:47                                                   ` Ray Andrews
2023-01-23 10:37                                             ` Roman Perepelitsa
2023-01-23 15:28                                               ` Ray Andrews
2023-01-23 15:40                                                 ` zeurkous
2023-01-23 16:02                                                   ` Ray Andrews
2023-01-23 16:25                                                     ` zeurkous
2023-01-23 16:26                                               ` Bart Schaefer
2023-01-24 20:00                                     ` Ray Andrews
2023-01-24 20:42                                       ` Bart Schaefer
2023-01-24 20:50                                         ` Bart Schaefer
2023-01-24 20:54                                         ` Ray Andrews
2023-01-24 23:28                                     ` Ray Andrews
2023-01-24 23:42                                       ` Bart Schaefer
2023-01-25  0:14                                         ` Ray Andrews
2023-01-25 16:38                                           ` Ray Andrews
2023-01-25 16:43                                             ` Roman Perepelitsa
2023-01-25 16:56                                               ` Ray Andrews
2023-01-25 17:02                                                 ` Roman Perepelitsa
2023-01-25 17:34                                                   ` Ray Andrews
2023-01-25 17:37                                                     ` Roman Perepelitsa
2023-01-25 18:26                                                       ` Ray Andrews
2023-01-25 18:34                                                         ` Roman Perepelitsa
2023-01-25 19:00                                                           ` Ray Andrews
2023-01-26  2:13                                                           ` Ray Andrews
2023-01-26  2:37                                                             ` Bart Schaefer
2023-01-26  4:27                                                               ` Ray Andrews
2023-01-26 20:26                                                                 ` Ray Andrews
2023-01-26 20:29                                                                   ` Roman Perepelitsa
2023-01-26 20:59                                                                     ` Ray Andrews
2023-01-26 21:17                                                                       ` Bart Schaefer
2023-01-26 21:41                                                                       ` Bart Schaefer
2023-01-26 21:44                                                                         ` Bart Schaefer
2023-01-26 22:36                                                                           ` Ray Andrews
2023-01-26 22:43                                                                             ` Bart Schaefer
2023-01-27  0:19                                                                               ` Ray Andrews
2023-01-27  3:36                                                                                 ` Ray Andrews
2023-01-27 17:51                                                                                 ` Ray Andrews
2023-01-27 20:45                                                                                   ` Bart Schaefer
2023-01-27 21:09                                                                                     ` Ray Andrews
2023-01-27 23:45                                                                                       ` scowles
2023-01-28  0:12                                                                                         ` Ray Andrews
2023-01-28  3:47                                                                                           ` Bart Schaefer
2023-01-28 16:42                                                                                             ` Ray Andrews
2023-01-28 22:51                                                                                               ` Bart Schaefer
2023-01-29  2:30                                                                                                 ` Ray Andrews
2023-01-29  3:03                                                                                                   ` Bart Schaefer
2023-01-29  3:44                                                                                                     ` Ray Andrews
2023-01-29  4:35                                                                                                       ` Bart Schaefer
2023-01-29 15:54                                                                                                         ` Ray Andrews
2023-01-29 21:21                                                                                                           ` Lawrence Velázquez
2023-01-29 22:33                                                                                                             ` Ray Andrews
2023-01-29 22:42                                                                                                               ` Lawrence Velázquez
2023-01-30  0:42                                                                                                                 ` Ray Andrews
2023-01-30  0:46                                                                                                                   ` Ray Andrews
2023-01-30  4:41                                                                                                                 ` Bart Schaefer
2023-01-30  5:16                                                                                                                   ` Lawrence Velázquez
2023-01-30  6:55                                                                                                                     ` Bart Schaefer
2023-01-30 14:40                                                                                                                   ` Ray Andrews
2023-01-30 14:55                                                                                                                     ` Ray Andrews
2023-01-30 14:56                                                                                                                     ` Roman Perepelitsa
2023-01-30 15:56                                                                                                                       ` Ray Andrews
2023-01-30 16:09                                                                                                                         ` Roman Perepelitsa
2023-01-30 16:24                                                                                                                           ` Bart Schaefer
2023-01-30 16:34                                                                                                                             ` Roman Perepelitsa
2023-01-30 23:05                                                                                                                           ` Ray Andrews
2023-01-30 17:50                                                                                                                         ` Bart Schaefer
2023-01-31  0:42                                                                                                                           ` Ray Andrews
2023-01-26 22:18                                                                         ` Ray Andrews
2023-01-25 22:18                                                   ` Bart Schaefer
2023-01-25 23:10                                                     ` Ray Andrews
2023-01-25 23:19                                                       ` Bart Schaefer
2023-01-26  0:55                                                         ` Ray Andrews
2023-01-22 19:52                                 ` Ray Andrews
2023-01-21 16:48             ` Bart Schaefer
2023-01-21  5:47 ` Lawrence Velázquez

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=3b93f68e-d090-15c0-c15e-a3d09d702f76@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).