9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] programmable pathname completion in Acme?
@ 2013-09-09 13:38 dexen deVries
  2013-09-09 14:14 ` Lee Fallat
  0 siblings, 1 reply; 6+ messages in thread
From: dexen deVries @ 2013-09-09 13:38 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

currently the ^F pathname completion is handled internally by Acme. is there a 
way to pass the argument of ^F to a script instead?


my use case: find an existing pathname by supplying /any/ substring of it and 
invoking completion, as opposed to current requirement of providing whole 
leading part. i have a script that takes part of pathname in $1 and returns 
all (hopefully exactly one) matching pathnames, and i want to plumb the ^F 
from Acme to it.


-- 
dexen deVries

[[[↓][→]]]




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

* Re: [9fans] programmable pathname completion in Acme?
  2013-09-09 13:38 [9fans] programmable pathname completion in Acme? dexen deVries
@ 2013-09-09 14:14 ` Lee Fallat
  2013-09-09 14:20   ` Bence Fábián
  0 siblings, 1 reply; 6+ messages in thread
From: Lee Fallat @ 2013-09-09 14:14 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 1003 bytes --]

Source code says: no.

Check out line 725* in text.c, and begin your journey!

*Code at line 725 in text.c for 9front acme:

case 0x06:
case Kins: //interesting, didn't know you could use the insert key to
invoke this too.
rp = textcomplete(t); //the path completion
if(rp == nil)
return;
nr = runestrlen(rp);
break; /* fall through to normal insertion case */


On Mon, Sep 9, 2013 at 9:38 AM, dexen deVries <dexen.devries@gmail.com>wrote:

> currently the ^F pathname completion is handled internally by Acme. is
> there a
> way to pass the argument of ^F to a script instead?
>
>
> my use case: find an existing pathname by supplying /any/ substring of it
> and
> invoking completion, as opposed to current requirement of providing whole
> leading part. i have a script that takes part of pathname in $1 and returns
> all (hopefully exactly one) matching pathnames, and i want to plumb the ^F
> from Acme to it.
>
>
> --
> dexen deVries
>
> [[[↓][→]]]
>
>
>

[-- Attachment #2: Type: text/html, Size: 1969 bytes --]

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

* Re: [9fans] programmable pathname completion in Acme?
  2013-09-09 14:14 ` Lee Fallat
@ 2013-09-09 14:20   ` Bence Fábián
  2013-09-09 14:26     ` Lee Fallat
  0 siblings, 1 reply; 6+ messages in thread
From: Bence Fábián @ 2013-09-09 14:20 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 1162 bytes --]

nothing prevents textcomplete from forking.


2013/9/9 Lee Fallat <lee.fallat@muraculous.ca>

> Source code says: no.
>
> Check out line 725* in text.c, and begin your journey!
>
> *Code at line 725 in text.c for 9front acme:
>
> case 0x06:
>  case Kins: //interesting, didn't know you could use the insert key to
> invoke this too.
> rp = textcomplete(t); //the path completion
>  if(rp == nil)
> return;
> nr = runestrlen(rp);
>  break; /* fall through to normal insertion case */
>
>
> On Mon, Sep 9, 2013 at 9:38 AM, dexen deVries <dexen.devries@gmail.com>wrote:
>
>> currently the ^F pathname completion is handled internally by Acme. is
>> there a
>> way to pass the argument of ^F to a script instead?
>>
>>
>> my use case: find an existing pathname by supplying /any/ substring of it
>> and
>> invoking completion, as opposed to current requirement of providing whole
>> leading part. i have a script that takes part of pathname in $1 and
>> returns
>> all (hopefully exactly one) matching pathnames, and i want to plumb the ^F
>> from Acme to it.
>>
>>
>> --
>> dexen deVries
>>
>> [[[↓][→]]]
>>
>>
>>
>

[-- Attachment #2: Type: text/html, Size: 2371 bytes --]

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

* Re: [9fans] programmable pathname completion in Acme?
  2013-09-09 14:20   ` Bence Fábián
@ 2013-09-09 14:26     ` Lee Fallat
  2013-09-09 14:36       ` Bence Fábián
  0 siblings, 1 reply; 6+ messages in thread
From: Lee Fallat @ 2013-09-09 14:26 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 210 bytes --]

On Mon, Sep 9, 2013 at 10:20 AM, Bence Fábián <begnoc@gmail.com> wrote:

> nothing prevents textcomplete from forking.
>

Sorry, I mean it is not possible without having to change some source code.
:)

[-- Attachment #2: Type: text/html, Size: 612 bytes --]

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

* Re: [9fans] programmable pathname completion in Acme?
  2013-09-09 14:26     ` Lee Fallat
@ 2013-09-09 14:36       ` Bence Fábián
  2013-09-09 15:59         ` Matthew Veety
  0 siblings, 1 reply; 6+ messages in thread
From: Bence Fábián @ 2013-09-09 14:36 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 400 bytes --]

Yep. That way it is hard :)
Although i think you could do it with acid without changing code.
If you are masochistic.


2013/9/9 Lee Fallat <lee.fallat@muraculous.ca>

> On Mon, Sep 9, 2013 at 10:20 AM, Bence Fábián <begnoc@gmail.com> wrote:
>
> nothing prevents textcomplete from forking.
>>
>
> Sorry, I mean it is not possible without having to change some source
> code. :)
>
>

[-- Attachment #2: Type: text/html, Size: 1131 bytes --]

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

* Re: [9fans] programmable pathname completion in Acme?
  2013-09-09 14:36       ` Bence Fábián
@ 2013-09-09 15:59         ` Matthew Veety
  0 siblings, 0 replies; 6+ messages in thread
From: Matthew Veety @ 2013-09-09 15:59 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I'm on the side of saying have an outside program do it for everything (at least in 9front). It would make things like this much easier.

Veety




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

end of thread, other threads:[~2013-09-09 15:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-09 13:38 [9fans] programmable pathname completion in Acme? dexen deVries
2013-09-09 14:14 ` Lee Fallat
2013-09-09 14:20   ` Bence Fábián
2013-09-09 14:26     ` Lee Fallat
2013-09-09 14:36       ` Bence Fábián
2013-09-09 15:59         ` Matthew Veety

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