Skip to content
New issue

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

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

Already on GitHub? # to your account

Open WezTerm here erred. #451

Closed
Tarocch1 opened this issue Feb 3, 2021 · 5 comments
Closed

Open WezTerm here erred. #451

Tarocch1 opened this issue Feb 3, 2021 · 5 comments
Labels
bug Something isn't working Windows Issue applies to Microsoft Windows

Comments

@Tarocch1
Copy link

Tarocch1 commented Feb 3, 2021

Describe the bug

Can not open wezterm in root directory (C:\ or D:) with "Open WezTerm here" in context menu. Normal in non-root directory (C:\Users).

Environment (please complete the following information):

  • OS: windows 10
  • Version: wezterm 20201101-103216-403d002d

To Reproduce

Install wezterm, click "Open WezTerm here" in root directory. Then report the following error:

image

Chinese error means "the directory name is invalid".

Configuration

No configuration file.

Expected behavior

Open wezterm in root directory correctly.

@Tarocch1 Tarocch1 added the bug Something isn't working label Feb 3, 2021
@wez
Copy link
Owner

wez commented Feb 3, 2021

Can you try these three cases and let me know which of them succeed/fail for you?

  • Right click on the drive letter icon in the "file tree" in the left hand pane and choose "Open WezTerm here"
  • Left click on the "This PC" icon in the file tree so that the right hand pane shows your Local Disk C: icon. Then right click on that drive icon in the right hand pane and choose "Open WezTerm here"
  • Left click on the drive letter icon in the file tree so that the right pane shows the contents of C:. Then right click on the background of the right hand pane and choose "Open WezTerm here"

Those are the three cases that are setup in the registry and one is subtly different from the others. Knowing which of them is working or not will help me figure out what's going on.

For what it's worth, all three cases succeed for me, so I wonder if this might be somehow related to locale or similar; my system is a US English system.

@wez wez added the Windows Issue applies to Microsoft Windows label Feb 3, 2021
@Tarocch1
Copy link
Author

Tarocch1 commented Feb 4, 2021

The first two succeed, the third fails.

@Tarocch1
Copy link
Author

Tarocch1 commented Feb 4, 2021

If I copy HKEY_CLASSES_ROOT\Drive\shell\Open WezTerm here\command to HKEY_CLASSES_ROOT\Directory\Background\shell\Open WezTerm here\command, the third case will succeed. But it will fail when right click on the background of the right hand pane of C:\Users and choose "Open WezTerm here".

If I remove all the quotes and backslashes in registry command, just like:

C:\Program Files\WezTerm\wezterm-gui.exe start --no-auto-connect --cwd %V

All cases will succeed.

@flyxyz123
Copy link

If I copy HKEY_CLASSES_ROOT\Drive\shell\Open WezTerm here\command to HKEY_CLASSES_ROOT\Directory\Background\shell\Open WezTerm here\command, the third case will succeed. But it will fail when right click on the background of the right hand pane of C:\Users and choose "Open WezTerm here".

If I remove all the quotes and backslashes in registry command, just like:

C:\Program Files\WezTerm\wezterm-gui.exe start --no-auto-connect --cwd %V

All cases will succeed.

%V will not succeed if you right-click at the background of the file explorer at a directory that contains space, for example: D:\Program Files and C:\Program Files. "%V will succeed in all cases. Detail solution please see #526 , alacritty/alacritty#4882 (comment), and https://gist.github.com/flyxyz123/53ac952fe94a14482565f1d96e5704d5

@wez wez closed this as completed in 684b7ea Mar 11, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2023

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 4, 2023
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
bug Something isn't working Windows Issue applies to Microsoft Windows
Projects
None yet
Development

No branches or pull requests

3 participants