plumber - current directory

89 views
Skip to first unread message

Steve Simon

unread,
Mar 4, 2021, 6:36:50 AM3/4/21
to plan9port-dev
Hi,

On native plan9 the plumber gets the current directory from /dev/wdir of the
window you plumbed in. how does it work in p9p? 

I am in the a situation where I can plumb absolute paths but plumbing
relative files always raises a query in 9term - annoying as the go compiler
always (rightly) prints relative paths.

is there some special code in rc to communicate with the plumber or is it done by
9term discovering the directory that the "foreground process" is in (in quotes as that could be hard to determine reliably I think).

thanks for any help,

-Steve

Russ Cox

unread,
Mar 4, 2021, 9:13:56 AM3/4/21
to plan9port-dev, Steve Simon
It's pretty awful, but there is no clean channel I am aware of to communicate the working directory back to 9term. So what I did instead is that if you use label(1) (or awd) to maintain the window title, then 9term uses the directory from the window title as the current directory in plumbing requests. The label(1) man page has suggested shell configuration.

Best,
Russ

Steve Simon

unread,
Mar 4, 2021, 11:52:41 AM3/4/21
to plan9port-dev
great, thanks.

I understand the pain but this solves my problem nicely.

-Steve

Reply all
Reply to author
Forward
0 new messages