Re: rc Re: distributive glob Re: type checking/signalling shell and utilities?

2021-11-19 Thread Brian Brombacher
You have a fundamental misunderstanding of what a shell is, how a program executes, and how arguments to that program are passed. You pass arguments to a program through a SINGLE ARRAY. This is true in every operating system. Stop advocating for things you don’t understand. > On Nov 19, 2021,

Re: rc Re: distributive glob Re: type checking/signalling shell and utilities?

2021-11-19 Thread Andreas Kusalananda Kähäri
On Sat, Nov 20, 2021 at 03:00:18AM +1100, Reuben ua Bríġ wrote: > > Date: Fri, 19 Nov 2021 18:12:26 +1100 > > From: Reuben ua Bríġ > > > > Next I would change the shell to pass as a parameter an array of > > bits describing which arguments are expanded from patterns and > > therefore definitely fi

Re: rc Re: distributive glob Re: type checking/signalling shell and utilities?

2021-11-19 Thread Andreas Kusalananda Kähäri
On Fri, Nov 19, 2021 at 06:12:26PM +1100, Reuben ua Bríġ wrote: > Hi Jonathan, > > Thanks for your message which was the most helpful. > I only just read it on marc.info. > MS which serves the ANU mail is withholding mail. > > I include some musings on rc that mightnt have made it to the list. >

Re: zsh Re: type checking/signalling shell and utilities?

2021-11-19 Thread Andreas Kusalananda Kähäri
On Fri, Nov 19, 2021 at 03:10:42PM +0100, Kusalananda Kähäri wrote: > On Fri, Nov 19, 2021 at 08:58:00PM +1100, Reuben ua Bríġ wrote: [cut] > > f=* sed -f$f > > In sh (inserts -f as a separate argument before each name that * expands > to): > > set -- * > for name do >

Re: zsh Re: type checking/signalling shell and utilities?

2021-11-19 Thread Andreas Kusalananda Kähäri
On Fri, Nov 19, 2021 at 08:58:00PM +1100, Reuben ua Bríġ wrote: > > Date: Fri, 19 Nov 2021 10:23:51 +0100 > > From: Andreas Kusalananda Kähäri > > > > What was the thing about "/" and "ti"? > > I might a lot of typos. by "ti" I meant "2". I had the glob "2/*" which > includes a "/". My point was

Re: zsh Re: type checking/signalling shell and utilities?

2021-11-19 Thread Andreas Kusalananda Kähäri
On Fri, Nov 19, 2021 at 07:34:58PM +1059, Reuben ua Bríġ wrote: > > Date: Fri, 19 Nov 2021 08:30:44 +0100 > > From: Andreas Kusalananda Kähäri > > > > Ah, so you are talking about options that takes multiple > > option-arguments. > > That roughly correct for what I was saying about lists, but te

Re: type checking/signalling shell and utilities?

2021-11-18 Thread Andreas Kusalananda Kähäri
On Fri, Nov 19, 2021 at 02:40:45PM +1059, Reuben ua Bríġ wrote: > > Date: Thu, 18 Nov 2021 21:20:36 +0100 > > From: Andreas Kusalananda Kähäri > > > > > all very well if you only need one array of strings, but useless if > > > you need more. > > > > What is the "more" you need? > > A greater

Re: type checking/signalling shell and utilities?

2021-11-18 Thread Andreas Kusalananda Kähäri
On Thu, Nov 18, 2021 at 03:14:16AM +1100, Reuben ua Bríġ wrote: > > Date: Thu, 18 Nov 2021 01:30:25 +1100 > > From: Reuben ua Bríġ > > > > Does anyone know of any shell and utilities where, for example, if > > > > -rf > > > > is a file name, the rm utility will understand so, and not think

Re: type checking/signalling shell and utilities?

2021-11-18 Thread Jonathan Thornburg
If you want to experiment in that direction, Tom Duff's 'rc' shell has 'list of words' as a primative, and avoids re-parsing strings. See https://en.wikipedia.org/wiki/Rc for more information. There doesn't seem to be an OpenBSD port of rc (but there is 'es', which claims to be derived from rc).

Re: type checking/signalling shell and utilities?

2021-11-17 Thread Theo de Raadt
Reuben ua Bríġ wrote: > > Date: Wed, 17 Nov 2021 09:34:21 -0700 > > From: "Theo de Raadt" > > > > Oh you want magic > > > > you'll find it next to the ponies. > > This is not magic. It is syntax. Or is C also "magic"? > > The shell is the one that expands *. The shell knows they are files. It

Re: type checking/signalling shell and utilities?

2021-11-17 Thread Theo de Raadt
Reuben ua Bríġ wrote: > I felt a more elegant solution would be a shell that can pass an array > of strings as an argument, just as C can, and knows when to do so, > rather than having each string as an argument. I wanted to know if > there is already a shell that accomplishes that.--No need to r

Re: type checking/signalling shell and utilities?

2021-11-17 Thread Paul de Weerd
On Thu, Nov 18, 2021 at 01:38:14AM +1100, Reuben ua Bríġ wrote: | > Date: Thu, 18 Nov 2021 01:30:25 +1100 | > From: Reuben ua Bríġ | > | > Does anyone know of any shell and utilities where, for example, if | > | > -rf | > | > is a file name, the rm utility will understand so, and not think

Re: type checking/signalling shell and utilities?

2021-11-17 Thread Todd C . Miller
On Thu, 18 Nov 2021 01:30:25 +1100, Reuben ua =?UTF-8?B?QnLDrcSh?= wrote: > Does anyone know of any shell and utilities where, for example, if > > -rf > > is a file name, the rm utility will understand so, and not think it is > a controlling flag (ugh! in-band signalling)? One where an array