Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[9fans] control-F completion question

4 views
Skip to first unread message

Rudolf Sykora

unread,
Oct 3, 2008, 12:43:08 PM10/3/08
to
Hello everybody!

If I understand it right ^f (or an 'ins' key) are taken care of by rio and thus the success of completion is essentially dependent on the namespace rio is using. This namespace is created when rio is started, usually right after a computer start. When the namespaces of individual windows are changed, e. g. by binding some remote filesystems, ^f can't handle those new files (since the rio namespace stays intact). Even though I may understand the reason (i.e. what I have just said) I find it rather irritating, having maybe the whole space I work with out of reach of ^f. Is there any help with that? Couldn't it be somehow achieved that ^f worked 'better'? (Not saying rc should take care of it, it probably should not; but what about if it were somehow connected with the individual windows? -- I don't know, it may not be possible, just asking. Having to always write 'lc' is somewhat ...). Starting a bunch of several rios can help it. But is that a right way to go? 

Thanks for answers.
Ruda

andrey mirtchovski

unread,
Oct 3, 2008, 12:55:25 PM10/3/08
to
i sometimes wonder whether the ^F completion stuff wasn't left this
way on purpose, as if to illustrate the futility of (essentially) a
single-node solution in the presence of distributed environments.

to solve what you perceive to be a problem you must ask yourself: what
is the one thing that is fully aware of the current namespace? it's
obviously not rio: it simply juggles windows with shells in them. is
it the shell? putting the completion in the shell itself would work
for plain terminals, but wouldn't work for rio. is it the kernel?
would you bother adding to the kernel something as silly as command
completion? how about completing across a network?

all difficult questions for a silly problem ;)

Nathaniel W Filardo

unread,
Oct 3, 2008, 12:56:24 PM10/3/08
to

This was the issue that prompted my experimental work for cross-namespace
visibility (see
https://wiki.ietfng.org/pub/Plan9/KernelInternals/CrossNamespaceWalkProject
if you're curious). This experiment is probably not the Right Way to do
this, but it may be food for thought.

Another alternative would be to spawn an exportfs "next to" the rc inside
the window, and have rio use that to find completions. Not terribly
pleasant, but might be workable.

--nwf;

Rudolf Sykora

unread,
Oct 3, 2008, 1:14:14 PM10/3/08
to


2008/10/3 andrey mirtchovski <mirtc...@gmail.com>

i sometimes wonder whether the ^F completion stuff wasn't left this
way on purpose, as if to illustrate the futility of (essentially) a
single-node solution in the presence of distributed environments.

to solve what you perceive to be a problem you must ask yourself: what
is the one thing that is fully aware of the current namespace? it's
obviously not rio: it simply juggles windows with shells in them. is
it the shell? putting the completion in the shell itself would work
for plain terminals, but wouldn't work for rio. is it the kernel?
would you bother adding to the kernel something as silly as command
completion? how about completing across a network?

all difficult questions for a silly problem ;)

I might again be wrong, but I thought the reason why the completion is not in the rc is partially thanks to the fact, that rc doesn't know anything you type until you press 'enter'. Only rio knows. (But all this is based only on my possibly broken opinion...)
But yes, the best would be (for me and I guess for everybody, since we usually speak to rc when we need the completion) to be as close to the rc's namespace as possible.
Correct me, please, if I am completely off the road... :)

Ruda
 

erik quanstrom

unread,
Oct 3, 2008, 1:36:26 PM10/3/08
to

you can accomplish this simply by using the plumber which,
by convention, shares a namespace with rio. suppose you
want insert to work with sources. then plumbing the string
Local 9fs sources
will allow insert to wor. alternatively, one might wish
to import sources with an aan connection before starting
rio. this works pretty well for me since most of the time
it's fairly easy to anticipate the stuff you're going to add
to the namespace.

- erik


Federico G. Benavento

unread,
Oct 3, 2008, 1:36:54 PM10/3/08
to
hola,

I got the tip from rog's post to affect rio's ns,
plumber's actually.

http://9fans.net/archive/2005/02/171

--
Federico G. Benavento

erik quanstrom

unread,
Oct 3, 2008, 1:37:33 PM10/3/08
to
> I might again be wrong, but I thought the reason why the completion is not
> in the rc is partially thanks to the fact, that rc doesn't know anything you
> type until you press 'enter'. Only rio knows. (But all this is based only on
> my possibly broken opinion...)
> But yes, the best would be (for me and I guess for everybody, since we
> usually speak to rc when we need the completion) to be as close to the rc's
> namespace as possible.
> Correct me, please, if I am completely off the road... :)
>
> Ruda

really? i use completion in the acme tag line more often.

- erik


Steve Simon

unread,
Oct 3, 2008, 2:47:15 PM10/3/08
to
rio does its magic (<ins> expanding filenames) by consulting /dev/wdir,
thus any way you can keep wdir up to date will allow <ins> to work,
(and the plumber to find files).

You can even use u9fs (or sftpfs) to connect to a unix box and ssh to
connect to a remote unix host, and plumb files (or use <ins> to expand
file names), this parses the current directory embedded in the unix
host's prompt - see rwd(1).

I have a similar system for accessing windows servers and windows workstations,
though I use my own server on the workstation rather than openssh.

-Steve

0 new messages