9front - general discussion about 9front
 help / color / mirror / Atom feed
* Fwd: [9front-commits] aiju at hg/plan9front: add Bfn script
       [not found] <hg.6b7a74d600f9.1472157402.-1245405291@tmove.9fs.net>
@ 2016-08-25 20:40 ` stanley lieber
  2016-08-25 20:47   ` [9front] " Benjamin Purcell
  2016-08-25 20:52   ` Julius Schmidt
  0 siblings, 2 replies; 6+ messages in thread
From: stanley lieber @ 2016-08-25 20:40 UTC (permalink / raw)
  To: 9front

Why isn't this in /rc/bin?

sl



-------- Original Message --------
From: The Computer <commits@code.9front.org>
Sent: Thu Aug 25 16:36:42 EDT 2016
To: 9front-commits@9front.org
Subject: [9front-commits] aiju at hg/plan9front: add Bfn script

details:     http://code.9front.org/hg/plan9front/rev/6b7a74d600f9
changeset:   5447:6b7a74d600f9
user:        aiju
date:        Thu Aug 25 22:36:39 2016 +0200
description: add Bfn script


diffstat:

 bin/Bfn |  16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diffs (20 lines):

diff -r 1f23a4b8b494 -r 6b7a74d600f9 bin/Bfn
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/Bfn	Thu Aug 25 22:36:39 2016 +0200
@@ -0,0 +1,16 @@
+#!/bin/rc
+if(! ~ $#* 1){
+	echo usage: $0 fn >[2=1]
+	exit usage
+}
+res=`{grep -n '^'$1'\(' *.c | sed -n 's/^([^:]*:[^:]*).*$/\1/gp' }
+ifs='
+'
+for(i in $res)
+	echo $i
+switch($#res){
+case 0
+	echo $1: not found >[2=1]
+case 1
+	plumb $res
+}



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9front] Fwd: [9front-commits] aiju at hg/plan9front: add Bfn script
  2016-08-25 20:40 ` Fwd: [9front-commits] aiju at hg/plan9front: add Bfn script stanley lieber
@ 2016-08-25 20:47   ` Benjamin Purcell
  2016-08-25 21:22     ` BurnZeZ
  2016-08-25 20:52   ` Julius Schmidt
  1 sibling, 1 reply; 6+ messages in thread
From: Benjamin Purcell @ 2016-08-25 20:47 UTC (permalink / raw)
  To: 9front

On Thu, Aug 25, 2016 at 3:40 PM, stanley lieber <sl@stanleylieber.com> wrote:
> Why isn't this in /rc/bin?

Why is this in 9front at all? Anyone who needs something like this
should write their own and it would likely be more flexible for their
use case. In fact, mine is called gB. I believe it's in contrib.

spew


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9front] Fwd: [9front-commits] aiju at hg/plan9front: add Bfn script
  2016-08-25 20:40 ` Fwd: [9front-commits] aiju at hg/plan9front: add Bfn script stanley lieber
  2016-08-25 20:47   ` [9front] " Benjamin Purcell
@ 2016-08-25 20:52   ` Julius Schmidt
  1 sibling, 0 replies; 6+ messages in thread
From: Julius Schmidt @ 2016-08-25 20:52 UTC (permalink / raw)
  To: 9front

Operator error; it's on /rc/bin locally but I committed it from /bin by 
accident.

On Thu, 25 Aug 2016, stanley lieber wrote:

> Why isn't this in /rc/bin?
>
> sl
>
>
>
> -------- Original Message --------
> From: The Computer <commits@code.9front.org>
> Sent: Thu Aug 25 16:36:42 EDT 2016
> To: 9front-commits@9front.org
> Subject: [9front-commits] aiju at hg/plan9front: add Bfn script
>
> details:     http://code.9front.org/hg/plan9front/rev/6b7a74d600f9
> changeset:   5447:6b7a74d600f9
> user:        aiju
> date:        Thu Aug 25 22:36:39 2016 +0200
> description: add Bfn script
>
>
> diffstat:
>
> bin/Bfn |  16 ++++++++++++++++
> 1 files changed, 16 insertions(+), 0 deletions(-)
>
> diffs (20 lines):
>
> diff -r 1f23a4b8b494 -r 6b7a74d600f9 bin/Bfn
> --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
> +++ b/bin/Bfn	Thu Aug 25 22:36:39 2016 +0200
> @@ -0,0 +1,16 @@
> +#!/bin/rc
> +if(! ~ $#* 1){
> +	echo usage: $0 fn >[2=1]
> +	exit usage
> +}
> +res=`{grep -n '^'$1'\(' *.c | sed -n 's/^([^:]*:[^:]*).*$/\1/gp' }
> +ifs='
> +'
> +for(i in $res)
> +	echo $i
> +switch($#res){
> +case 0
> +	echo $1: not found >[2=1]
> +case 1
> +	plumb $res
> +}
>
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9front] Fwd: [9front-commits] aiju at hg/plan9front: add Bfn script
  2016-08-25 20:47   ` [9front] " Benjamin Purcell
@ 2016-08-25 21:22     ` BurnZeZ
  2016-08-25 21:25       ` Benjamin Purcell
  2016-08-25 22:01       ` Ethan Grammatikidis
  0 siblings, 2 replies; 6+ messages in thread
From: BurnZeZ @ 2016-08-25 21:22 UTC (permalink / raw)
  To: 9front

On Thu Aug 25 16:47:28 EDT 2016, benjapurcell@gmail.com wrote:
> On Thu, Aug 25, 2016 at 3:40 PM, stanley lieber <sl@stanleylieber.com> wrote:
> > Why isn't this in /rc/bin?
> 
> Why is this in 9front at all? Anyone who needs something like this
> should write their own and it would likely be more flexible for their
> use case. In fact, mine is called gB. I believe it's in contrib.

Yeah, it's in spew/rc/fns.rc

Out of curiosity, how do you decide whether something you write goes
into some rc function "library", or its own file?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9front] Fwd: [9front-commits] aiju at hg/plan9front: add Bfn script
  2016-08-25 21:22     ` BurnZeZ
@ 2016-08-25 21:25       ` Benjamin Purcell
  2016-08-25 22:01       ` Ethan Grammatikidis
  1 sibling, 0 replies; 6+ messages in thread
From: Benjamin Purcell @ 2016-08-25 21:25 UTC (permalink / raw)
  To: 9front

On Thu, Aug 25, 2016 at 4:22 PM,  <BurnZeZ@feline.systems> wrote:
> Out of curiosity, how do you decide whether something you write goes
> into some rc function "library", or its own file?

size I guess.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9front] Fwd: [9front-commits] aiju at hg/plan9front: add Bfn script
  2016-08-25 21:22     ` BurnZeZ
  2016-08-25 21:25       ` Benjamin Purcell
@ 2016-08-25 22:01       ` Ethan Grammatikidis
  1 sibling, 0 replies; 6+ messages in thread
From: Ethan Grammatikidis @ 2016-08-25 22:01 UTC (permalink / raw)
  To: 9front

On Thu, Aug 25, 2016, at 10:22 PM, BurnZeZ@feline.systems wrote:
> 
> Out of curiosity, how do you decide whether something you write goes
> into some rc function "library", or its own file?

i always make a file unless it's specific to what i'm doing in one window.

-- 
I'm too old to use vi.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-08-25 22:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <hg.6b7a74d600f9.1472157402.-1245405291@tmove.9fs.net>
2016-08-25 20:40 ` Fwd: [9front-commits] aiju at hg/plan9front: add Bfn script stanley lieber
2016-08-25 20:47   ` [9front] " Benjamin Purcell
2016-08-25 21:22     ` BurnZeZ
2016-08-25 21:25       ` Benjamin Purcell
2016-08-25 22:01       ` Ethan Grammatikidis
2016-08-25 20:52   ` Julius Schmidt

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