Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: coloring substitution seems to eat next line.

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.
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.


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.

Messages sorted by: Reverse Date, Date, Thread, Author