zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: coloring substitution seems to eat next line.
Date: Fri, 11 Nov 2022 13:26:32 -0800	[thread overview]
Message-ID: <2dd50dc8-cdbc-02e0-0e1e-485718732d0d@eastlink.ca> (raw)
In-Reply-To: <CAH+w=7ac3JVN_c8oFzsDf5i83vw6c_npYR6N586agKTmwrGZMA@mail.gmail.com>


On 2022-11-11 11:25, Bart Schaefer wrote:
> Because I'd never seen anything like that before and I had no idea where
>> to even begin looking for an answer.  God knows how many tools are out
>> there that I've never even heard of.
> I find this response baffling.  Roman wrote "local MATCH ..." so
> obviously it's a zsh thing.  Even if it might be another tool, at
> least try checking the zsh manual first?
>
Obviously but he showed it to me before I knew there was any such thing 
to look for.  If I have need of it again then I'll be sure to read up on 
it.  For now, it's water under the bridge.
> https://zsh.sourceforge.io/Doc/Release/zsh_6.html#index_split-5_vr_letter-M
Tx, now that I know there is such a thing, I'll read up on it.
> Isn't that also true of a glossary?
Not exactly.  The sort of thing I have in mind would be purpose built to 
explain zsh anatomy.  It would show you sample code and then 'dissect' 
it for you, explaining what all the bits and pieces are called and how 
they function.  You'd get an understanding of the structure of the thing 
at the most zoomed out level.  Anatomy 101.
>
> I mean, go back to the mention of how you've never heard of $foo:t
> before.  Well, gosh, look up "colon" in the concept index:
You have me there.  I was pleased to find out you could search for 
'colon'.  Searching for ':' was obviously not much use.  Sorta like just 
recently the ':#' construction.  You won't have much luck googling for 
'zsh'  ':#' you hafta know ahead of time the name of those sorts of 
manipulations.  'parameter expansions' no?  Once I know what to call it, 
I can zoom in on the correct part of the manual.
> Now you know it's called a "modifier" so when you see $foo:A you know
> where to look.
>
> Or you could look up "substitution"
Nuts, I thought I  had it right with 'expansion' :(  But yes, that's the 
thing, '//'  ':#'  '%%' ... these are substitutions.  So  yeah, that's 
the magic word that takes me to the relevant information. Without the 
terminology one is quite lost.
>
> https://zsh.sourceforge.io/Doc/Release/zsh_4.html#index_split-3_cp_letter-S
>
> where you find that for parameters it's usually called "expansion" and
> expansion has flags and oh by the way there's even a set of expansion
> "rules" that will tell you all about the procedure zsh follows to
> perform one.
Ah! So I was right the first time. Yes 'expansions' even when they are 
contractions -- doesn't matter what the word is, just so long as I know it.
>
> Or you could just scan through the concept index to get an idea of
> what terminology you're likely to encounter on this list, without
> having to read the whole manual.

My imaginary glossary would be specifically designed to get you up to 
speed on terminology.  Anyway it IS time to do some reading.  Anecdote: 
when I first tried Linux, coming from DOS, one of the first things I 
wanted to find out was how you write a batch-file.  Googled, nada. 
What?  No batch-files in Linux?  Well yes, but they're called scripts.  
And switches are called options.  And variables are called parameters.  
And so on. Getting the lingo straight should be done up front with a 
purpose built document for that.


>


  reply	other threads:[~2022-11-11 21:27 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-10  0:43 Ray Andrews
2022-11-10  8:02 ` Roman Perepelitsa
2022-11-10 18:25   ` Ray Andrews
2022-11-10 18:36     ` Roman Perepelitsa
2022-11-10 18:45       ` Ray Andrews
2022-11-10 18:54       ` Bart Schaefer
2022-11-10 19:28         ` Ray Andrews
2022-11-10 20:22           ` Bart Schaefer
2022-11-10 21:42             ` Ray Andrews
2022-11-10 21:51               ` Roman Perepelitsa
2022-11-11 17:24                 ` Ray Andrews
2022-11-10 22:47               ` Bart Schaefer
2022-11-10 23:07                 ` Ray Andrews
2022-11-10 23:27                   ` Bart Schaefer
2022-11-11 15:00                     ` Ray Andrews
2022-11-11 18:15                       ` Bart Schaefer
2022-11-11 18:50                         ` Ray Andrews
2022-11-11 19:25                           ` Bart Schaefer
2022-11-11 21:26                             ` Ray Andrews [this message]
2022-11-12  4:24                               ` Bart Schaefer
2022-11-12 14:03                                 ` Ray Andrews
2022-11-13 15:09                                   ` Ray Andrews
2022-11-14 14:12                                     ` Roman Perepelitsa
2022-11-14 17:08                                     ` Ray Andrews
2022-11-14 17:12                                       ` Roman Perepelitsa
2022-11-14 18:58                                         ` Ray Andrews
2022-11-14 20:00                                           ` Bart Schaefer
2022-11-14 23:25                                             ` Ray Andrews
2022-11-15 14:17                                               ` Belaboring substitution syntax Ray Andrews
2022-11-16  1:49                                                 ` Bart Schaefer
2022-11-16  2:54                                                   ` Ray Andrews
2022-11-16  6:26                                                     ` Bart Schaefer
2022-11-16 14:08                                                       ` Ray Andrews
2022-11-16 14:13                                                         ` Roman Perepelitsa
2022-11-17  2:31                                                           ` Bart Schaefer
2022-11-17  8:59                                                             ` Roman Perepelitsa
2022-11-17 16:02                                                               ` Ray Andrews
2022-11-16 20:46                                                       ` Ray Andrews
2022-11-16 10:32                                                   ` 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=2dd50dc8-cdbc-02e0-0e1e-485718732d0d@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).