Tuesday 24 September 2019

gnu screen - Using screenrc, how can I make `C-a c` open a new window at the current window's working directory?


Using screenrc, how can I make C-a c open a new window at the current window's working directory? By default it appears to open the new window at the working directory at the time the original screen session is invoked.



Answer



Based on this SO answer, I think this should work:


bind c stuff "screen -X chdir \$PWD; screen^M"

I'll go try it on my remote shell and report back if it works for me.


edit: Yup, it works. The first "bind" command is actually not needed.


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...