9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] plumbing with spaces
@ 2024-11-06  1:15 népéta mew
  2024-11-06  4:57 ` umbraticus
  0 siblings, 1 reply; 5+ messages in thread
From: népéta mew @ 2024-11-06  1:15 UTC (permalink / raw)
  To: 9front

hi there. it's Me.

i've noticed that plumbing files with spaces in their name
tends to be somewhat janky, i think because the plumber expands
the spaces before executing an rc command in plumb start.
so:

a. what's the best way of working around this?
   is surrounding a $file with a bunch of quotes in the rc command
   the best solution, or is there a better solution?

b. maybe Upgrading the plumber to somehow deal nicely with spaces
   would be useful? i dunno.

thank you for reading this is the end of the e mail good bye

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

* Re: [9front] plumbing with spaces
  2024-11-06  1:15 [9front] plumbing with spaces népéta mew
@ 2024-11-06  4:57 ` umbraticus
  2024-11-06 12:40   ` hiro
  0 siblings, 1 reply; 5+ messages in thread
From: umbraticus @ 2024-11-06  4:57 UTC (permalink / raw)
  To: 9front

It's not really the plumber's fault; rather it's how the
programs at either end cope. I do think it would be
nice if you could select a line in rio by double-clicking
then plumb: sadly the newline messes things up, so
one must resort to surrounding spacey plumb strings
with brackets or braces or quotes or whatever to avoid
precision sweeping. Both sam and ed cope with my
'test file with spaces' per the below rule. I pass no
comment on any other editor.

data matches test.*
arg isfile $data
plumb start window sam ''''$file''''

umbraticus

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

* Re: [9front] plumbing with spaces
  2024-11-06  4:57 ` umbraticus
@ 2024-11-06 12:40   ` hiro
  2024-11-07  8:46     ` umbraticus
  0 siblings, 1 reply; 5+ messages in thread
From: hiro @ 2024-11-06 12:40 UTC (permalink / raw)
  To: 9front

"sadly the newline messes things up"
which step actually messes it up? i realize only now that i never
understood how this works.

On Wed, Nov 6, 2024 at 5:58 AM <umbraticus@prosimetrum.com> wrote:
>
> It's not really the plumber's fault; rather it's how the
> programs at either end cope. I do think it would be
> nice if you could select a line in rio by double-clicking
> then plumb: sadly the newline messes things up, so
> one must resort to surrounding spacey plumb strings
> with brackets or braces or quotes or whatever to avoid
> precision sweeping. Both sam and ed cope with my
> 'test file with spaces' per the below rule. I pass no
> comment on any other editor.
>
> data matches test.*
> arg isfile $data
> plumb start window sam ''''$file''''
>
> umbraticus

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

* Re: [9front] plumbing with spaces
  2024-11-06 12:40   ` hiro
@ 2024-11-07  8:46     ` umbraticus
  2024-11-07  8:52       ` umbraticus
  0 siblings, 1 reply; 5+ messages in thread
From: umbraticus @ 2024-11-07  8:46 UTC (permalink / raw)
  To: 9front

> "sadly the newline messes things up"
> which step actually messes it up? i realize only now that i never
> understood how this works.

Same. Thinking about it a bit, I'd say it probably has to do with
the regexps used in plumb rules: \n does not match a newline,
nor can you embed a literal one due to how the rules file is parsed.

e.g. sam & sed both mention something along these lines in their
respective manpages; here's sam(1):

	Regular expressions are as in regexp(6) with the addition of
	\n to represent newlines.

So to allow newlines in plumb "matches" rules those programs could
be a place to look. (or else make this a standard feature of regexp??)

umbraticus

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

* Re: [9front] plumbing with spaces
  2024-11-07  8:46     ` umbraticus
@ 2024-11-07  8:52       ` umbraticus
  0 siblings, 0 replies; 5+ messages in thread
From: umbraticus @ 2024-11-07  8:52 UTC (permalink / raw)
  To: 9front

hahaha I exited hold mode on my email and immediately came
up with a plumb rule that succeeds in matching a newline:

data matches '[	-\v]'
plumb start echo boo

That's a range from \x9 to \xb. Indeed, I see boo on my
console, so everything else plays nice. Adding support
for \n seems like a decent convenience.

umbraticus

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

end of thread, other threads:[~2024-11-07  8:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-06  1:15 [9front] plumbing with spaces népéta mew
2024-11-06  4:57 ` umbraticus
2024-11-06 12:40   ` hiro
2024-11-07  8:46     ` umbraticus
2024-11-07  8:52       ` umbraticus

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