new tab does not inherit working directory when using `script`
If using script
(https://manpages.ubuntu.com/manpages/bionic/en/man1/script.1.html) to record a terminal session, creating a new tab does not inherit the working directory that you are in while recording. Instead, it inherits the working directory from before the script
command was executed.
I'm not sure if this is an intentional or unintentional design. The tab title does show the working directory you are in while recording using script
, so it seems like it could be possible for XFCE Terminal to know what directory you are inside of while using script
and create new tabs in that same directory.
In #19 there is some discussion about saving the scrollback buffer for each tab in XFCE Terminal so that it can be later restored. I am now wondering if it might be a better design to do that functionality with the script
command inside your .bashrc
file instead of XFCE Terminal doing it. It's fairly easy to save the session scrollback for every tab with script
with .bashrc
, however, this working directory issue is the only drawback that I can find so far.