The Wayback Machine - https://web.archive.org/web/20201110190417/https://github.com/nushell/nushell/issues/2649
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New terminal opens always in home directory when called from Tilix #2649

Open
zbraniecki opened this issue Oct 8, 2020 · 3 comments
Open

New terminal opens always in home directory when called from Tilix #2649

zbraniecki opened this issue Oct 8, 2020 · 3 comments

Comments

@zbraniecki
Copy link

@zbraniecki zbraniecki commented Oct 8, 2020

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:

  1. Install tilix
  2. Set nushell as the default shell with chsh
  3. Open terminal in tilix
  4. Navigate to some directory
  5. Call New Terminal (ctrl+shift+a in my case)

Expected behavior
New terminal opens in the same directory as the previous one.

Configuration (please complete the following information):

  • OS (e.g. Windows): Ubuntu 20.04
  • Nu version (you can use the version command to find out): 0.20
@fdncred
Copy link
Collaborator

@fdncred fdncred commented Oct 8, 2020

It looks like tilix must be passing the path to the terminal but I'm not sure exactly how it works under the hood.

@zbraniecki
Copy link
Author

@zbraniecki zbraniecki commented Oct 21, 2020

It seems like tilix is just calling PWD=~/dir to set the current working dir and bash/zsh accept it while NuShell does not.

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?

@fdncred
Copy link
Collaborator

@fdncred fdncred commented Oct 21, 2020

I looked into this a bit and it doesn't appear the nushell looks for or knows about an environment variable called PWD on startup. Although, I did notice that when set_path is called it sets the PWD env var. I'm guessing that somewhere in nu-cli/src/cli.rs, perhaps in the fn cli() one would need to check the PWD env var and use it if found, for this functionality to work like you want it to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.