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

'Open alacritty here' does not work when working_directory is set #7987

Closed
codevogel opened this issue May 18, 2024 · 9 comments
Closed

'Open alacritty here' does not work when working_directory is set #7987

codevogel opened this issue May 18, 2024 · 9 comments

Comments

@codevogel
Copy link

If I right click in a directory and click 'Open alacritty here', I open alacritty in the working_directory rather than the directory I clicked 'Open here' in.

Steps to reproduce:

  • Set shell.program = 'wsl'
  • Right click to open alacritty in a folder somewhere on your system, observe that you are indeed in the corresponding directory
  • Now set working_directory to a directory such as working_directory = '\\wsl$\Ubuntu\home\kamiel'
  • Right click to open alacritty in the same folder, observe that you are now in the working_directory

System

OS: Windows + WSL
Version: v0.13.2
Linux/BSD: Ubuntu 22.04.4 LTS

Logs

Crashes: -
Font/Terminal size: -
Keyboard and bindings: -

@chrisduerr
Copy link
Member

The "open here" stuff works just by passing --working-directory to the CLI. Can you confirm that the behavior is identical when trying to open with the CLI option? As far as I remember, CLI should overrule config here.

@codevogel
Copy link
Author

codevogel commented May 21, 2024

The "open here" stuff works just by passing --working-directory to the CLI. Can you confirm that the behavior is identical when trying to open with the CLI option? As far as I remember, CLI should overrule config here.

Running alacritty --working-directory C:\Users\Kamiel\Workspace in PowerShell opens alacritty in the Workspace dir, but right clicking in the Workspace folder from Windows Explorer and selecting open here from the context menu brings me to the working-directory set in my toml.

Would there be a way to determine with what arguments alacritty was launched? Then I could test what the 'Open here' actually does.

@chrisduerr
Copy link
Member

How did you install Alacritty? Also can you try without wsl shell?

@codevogel
Copy link
Author

codevogel commented May 24, 2024

How did you install Alacritty? Also can you try without wsl shell?

I tried installing Alacritty through the binary on the releases page and through choco.

When I remove the shell.program = 'wsl' line, the problem persists (it launches PowerShell in my wsl home directory) regardless of clicking 'open here'

@scmx
Copy link

scmx commented May 24, 2024

Might not be related. But Alacritty wouldn't start for me yesterday. I opened another terminal and changed the working_directory = "/Users/me" instead of incorrect working_directory = "$HOME". Which solved my problem.
When I added that config I incorrectly thought it worked, because apparently I hadn't quit all instances of Alacritty, so I didn't notice the problem.

Really enjoying Alacritty!

@codevogel
Copy link
Author

codevogel commented May 24, 2024

Good catch, but I did make sure my profile was correctly reloaded after changing my config.

@chrisduerr
Copy link
Member

What happens when you set the working directory to not be your home directory? Does it still move you there, say /tmp for example?

@kchibisov
Copy link
Member

I'm pretty sure it was fixed by 6585d60 which is not present in any release yet.

So you can try build msi yourself.

@codevogel
Copy link
Author

I'm pretty sure it was fixed by 6585d60 which is not present in any release yet.

So you can try build msi yourself.

I haven't tried this yet but it seems quite obvious that that should do it, yeah.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants