Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
New terminal opens always in home directory when called from Tilix #2649
Comments
|
It looks like tilix must be passing the path to the terminal but I'm not sure exactly how it works under the hood. |
|
It seems like tilix is just calling Gnome Terminal seems to be using some other strategy because it works with Nushell (a'ka, it opens new tab in the current dir). Can someone tell me how Nushell wants to be informed about the dir in which to open? |
|
I looked into this a bit and it doesn't appear the nushell looks for or knows about an environment variable called |
|
@fdncred the intro you provided is enough to get new This makes the following work:
That's exactly as expected! The final piece of the puzzle I am missing is how does the shell augment the value of In other words, this doesn't work:
It seems that in Gnome there's some game around something called VTE:
I don't know how bash/zsh inform VTE to save the current directory so that it gets extracted as Anyone has an idea how to approach it? |
|
My guess would be to call |
I tried to plug that into filesystem_shell.rs::cd and it didn't work. And I don't think it should. Environmental variables are per-shell-session, so setting Opening a new one, somehow either Tilix would have to "pick up" the PWD of the previous session and pass it to the new one (I tested if Tilix passes any env::args - it doesn't), or there has to be some system that sets the default PWD value for a new terminal. It seems to me that somehow bash/zsh do that and that's why with my patch newly opened nushell has the right My intuition tells me that since we don't want any new terminal to use the path, just the terminal opened from the given terminal, that it should be Tilix taking the PWD of the terminal in focus when But, knowing POSIX, I expect my logic to not hold. :) @gnunn1 - can you shed some light on how to do this properly? I suspect some black-VTE magic to be involved :( |


Describe the bug
When a terminal is open to some directory in Tilix and I open a new one, bash and zsh will open it in the same directory as the previous terminal, but after setting Nushell as the default it always opens in home directory.
To Reproduce
Steps to reproduce the behavior:
chshctrl+shift+ain my case)Expected behavior
New terminal opens in the same directory as the previous one.
Configuration (please complete the following information):
versioncommand to find out): 0.20