zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: path PATH
Date: Sun, 29 Jan 2023 07:54:54 -0800	[thread overview]
Message-ID: <1898f1f5-9d67-c832-c145-ee02690f4bd2@eastlink.ca> (raw)
In-Reply-To: <CAH+w=7aP3V8ipZCm=d5jd=ahNpEOuDu6CYUG0CxA5+m-HKiuFg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4491 bytes --]


On 2023-01-28 20:35, Bart Schaefer wrote:
>
> It's the other way around.  The function gave you what you want, so
> there's nothing for a built-in to the shell to do.
Sure, that's a design decision.  How useful does something have to be 
before it's  hard-coded.  Matter of judgement.  Tho I'm vocal with my 
opinion, at the end of the day it's not my call, nor should it be.  
However a guy like you is so conformed to the status quo -- nuts, you 
built it -- that you no longer 'see' the defects as defects (this 
presuming I'll right when in fact I am often wrong). Where a guy like me 
can be useful is in providing a fresh view of things.  I advocate for 
spelling reform.  Folks who's spelling is perfect say that spelling 
reform isn't needed.
> If NO function could give you what you wanted, that's a different
> question.  E.g., it's a valid point that a parameter declared with
> "typeset -E" could be more accurately described by $parameters /
> ${(t)var}, or that justification width could be more obviously
> obtainable than just "typeset +m",
That's another interesting question.  IMHO core functionality is not -- 
or not hugely -- concerned with appearance -- the individual tarts 
things up as he sees fit -- but *complete* information is a core 
function.  OTOH, a justification option would be very nice -- saves me 
the trouble.  But, for example, I'd put spaces around the equal signs 
cuz it then breaks the output into logical words and thus makes it very 
much easier to, say, columnize the display.
>   or even that the documentation
> could do a better job of relating ${(t)var} to the options of
> "typeset" (I've submitted a patch for that last, incidentally).

In that case my opinion is that the 'Parameters' section of the manual 
should tell the whole story vs. the information being attached to 
individual commands, since there are several commands -- not to mention 
${(t)...} -- that have a duplicated use/reference to the attributes; so 
they should all refer back to Mother.  IOW, the fact that parameters 
have attributes is a fundamental feature of the shell irrespective of 
any particular command, not an incidental collection of details 
pertaining to this command or that command.  That could be said better.

In the crudest, outline form, add something like the 'help' for my function:


    15.1 Description

A parameter has a name, a value, and a number of attributes. A name may 
be any sequence of alphanumeric characters and underscores, or the 
single characters ‘*’, ‘@’, ‘#’, ‘?’, ‘-’, ‘$’, or ‘!’. A parameter 
whose name begins with an alphanumeric or underscore is also referred to 
as a /variable/.

The attributes of a parameter determine the /type/ of its value, often 
referred to as the parameter type or variable type, and also control 
other processing that may be applied to the value when it is referenced. 
The value type may be a /scalar/ (a string, an integer, or a floating 
point number), an array (indexed numerically), or an /associative/ array 
(an unordered set of name-value pairs, indexed by name, also referred to 
as a /hash/).

Here's a complete list of the types and the attributes ( with their 
single-letter designations as used in various commands [ maybe not but 
.... ] ):

TYPES:

S: An ordinary scalar (not an integer or float).
I: An integer.
F: A float ('typeset -F:' decimal display or 'typeset -E': scientific 
display).
A: A normal array.
H: An associative array or 'association' or 'hash' (always 'hideval' as 
well).

ATTRIBUTES:

e: The variable has been exported to the enironment and is thus 
persistent within that terminal -- it will be inherited by subshells.
l: The variable is local to the running function.
t: The variable is 'tied' to another variable.
s: The variable is special to the shell.
r: The variable is read-only (this often goes with 'special').
v: 'hideval': the value of the variable will be hidden -- there are 
things we really don't want to see, like lists of color codes.  This 
tends to go with 'special' and 'hide'.
h: Hide: Used with 'special' ??
u: Unique: ??
?: Undefined: For autoloaded parameters not yet loaded (whatever that 
means).

These types and attributes will now be discussed in detail:

... back to text.


BTW, that section of the manual is very well written, almost literate, 
and technical writing hardly ever is, tho I do wish it was complete.

BTW am I mistaken that 'hideval' is not discussed anywhere?


[-- Attachment #2: Type: text/html, Size: 6168 bytes --]

  reply	other threads:[~2023-01-29 15:55 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
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 [this message]
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=1898f1f5-9d67-c832-c145-ee02690f4bd2@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).