From mboxrd@z Thu Jan 1 00:00:00 1970 Content-type: text/plain; charset=utf-8 MIME-version: 1.0 (Mac OS X Mail 8.2 \(2102\)) From: Brian Zwahr In-reply-to: Date: Thu, 16 Jul 2015 10:44:24 -0500 Content-transfer-encoding: quoted-printable Message-id: <3D97D3DC-7730-4EE8-A5D5-EE6D81A05824@icloud.com> References: <2967C352-8607-44E6-87FA-DB94B18688DC@icloud.com> To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Subject: Re: [9fans] Acme 2-1 chord arguments Topicbox-Message-UUID: 60731346-ead9-11e9-9d60-3106f5b1d025 Thanks for the information! I must confess, I don=E2=80=99t fully = understand your idiomatic answer.=20 > On Jul 15, 2015, at 10:41 AM, dexen deVries = wrote: >=20 > dirty 1.) rc -c 'git '^ =20 > note the space after git >=20 > idiomatic 1.) use win(1), pass 'command' argument a script which = executes git for each line of input as arguments through rc(1) to = evaluate the arguments in the usual way >=20 > 2.) you can pass complex regular expression as argument to grep(1), = without rc(1) choking on metacharacters. > the argument is guaranteed not to have unforeseen side effects. >=20 >=20 > example win(1) script: > #!/usr/bin/env rc >=20 > orig_ifs =3D $ifs >=20 > PAGER=3Dcat >=20 > while (true) { > ifs=3D'' > echo -n 'git> ' > line =3D `{read} > ifs =3D $orig_ifs > rc -c 'git '^ $line > } >=20