tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Go packages with many dependencies



* On 2018-08-15 at 15:18 BST, Roland Illig wrote:

> Am 15.08.2018 um 08:52 schrieb Jonathan Perkin:
> > * On 2018-08-15 at 04:25 BST, Roland Illig wrote:
> >> I prefer a uniform field separator. Isn't there some Make feature to access the n'th word of a variable? Like ${dep:S,:, ,g:[2]}? I think it's easier to read than the :C modifier.
> > 
> > I came to this same conclusion.  We discussed on IRC that in theory we
> > should be able to use the :tsc and :[range] operators to do something
> > like this:
> > 
> >   VAR:ts::[1]
> > 
> > to easily extract out a field, but it appears that doesn't work even
> > though it should.
> 
> To replace spaces with colons, the :ts: modifier works nicely. But
> that's the wrong direction for this case.

Oh, right.  The part I was clearly missing in the manual page was "on
expansion".  I'll blame macOS man(1) for splitting the word
"expansion" across a newline for that...

>         @echo ${VAR:S,:, ,g:[1]}

Yeh, I'll just use that.

Thanks,

-- 
Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com


Home | Main Index | Thread Index | Old Index