Yeah it has to work on OpenBSD and preferably FreeBSD too.I think you can probably use sysctl KERN_FILE, KERN_FILE_BYPID and look for KERN_FILE_CDIR in fd_fd on OpenBSD at least.
I don't think we need a new option, why not make default-path default to "" and override the automatic inheriting if it's changed to something else? On Thu, Dec 01, 2011 at 08:32:38PM +0100, Romain Francoise wrote: > I figured this would be controversial... > > First some context: this was originally filed a wishlist request in the > Debian BTS. I replied that the only way to keep the cwd is to use the > client, and that achieving this from keys would involve non-portable ways > of getting the working directory and so wasn't possible. > > But after thinking about it some more I decided to try it out anyway, and > found that it's quite useful in contexts where you're working on something > in one window, the window gets blocked by something long-running (like > make, tig, or whatever) and you want to run something else in the > meantime. It's more convenient to quickly create/destroy a pane than to > background or interrupt whatever you're running in the first pane and when > you do that, not having to cd back to where you were working is very > convenient. > > It seems that this is often requested by users, it's in the FAQ and > also mentioned in various places: > > http://unix.stackexchange.com/questions/12032/ > > https://wiki.archlinux.org/index.php/Tmux#Split_window_and_retain_current_directory > > so I think that the potential benefits to users outweigh the relative > ugliness of having non-portable code (and platform-differentiated > features) in tmux. I'm not interested in workarounds which involve running > the client from a key via run-shell, tmux can do that efficiently by > itself as the patch shows. > > Anyway, I looked at the various BSDs and FreeBSD exports the required info > via KERN_PROC_PGRP (that probably covers Dragonfly as well). For NetBSD > and OpenBSD I didn't find anything, the kinfo_proc interface is different. > But maybe I'm wrong. > > Is it really a hard requirement to have it work on all BSDs even if it's > not enabled by default? I'd really like to avoid having to carry this > feature as a Debian patch. > > Thanks, > -- > Romain Francoise <rfranco...@debian.org> > http://people.debian.org/~rfrancoise/ ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users