screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Current working directory in split window


From: address@hidden
Subject: Current working directory in split window
Date: Tue, 11 Dec 2018 17:02:13 -0500

Hi,

I'd looking to bind a key to split a window while maintaining the current working directory in both windows.  The below .screenrc entry, for example,

 bind | eval "split -v" focus screen

properly creates a second region, however, the new region on the right of the vertical split defaults to the original directory from which screen session was originally launched (in the left window).

The below related work-arounds involve use of the command line via screen -X to transfer $PWD to chdir.  I suspect that there is a way, however, for current environment variables such as $PWD to be accessed from from within .screenrc itself, since launching a nested screen window (without the split) defaults to the current working directory in the second session.

https://stackoverflow.com/questions/1517414/how-to-make-gnu-screen-start-a-new-window-at-the-current-working-directory

https://web.archive.org/web/20101217181229/http://www.michaelkelleher.info:80/?p=99

I'd appreciate any thoughts.

Steve


reply via email to

[Prev in Thread] Current Thread [Next in Thread]