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

OSC 9 Support - avoid canonicalized path #1685

Closed
bminer opened this issue Dec 18, 2024 · 2 comments
Closed

OSC 9 Support - avoid canonicalized path #1685

bminer opened this issue Dec 18, 2024 · 2 comments

Comments

@bminer
Copy link

bminer commented Dec 18, 2024

When I duplicate a tab in Windows Terminal with osc9_9 enabled in config.nu, if my current working directory is in a mapped network drive, the duplicated tab shows the current working directory as a canonicalized UNC path. This is a known Rust issue: rust-lang/rust#42869

I suggest using std::path::absolute (although it does not resolve symlinks or access the filesystem) instead of std::fs::canonicalize before sending the path to the terminal using OSC 9.

Another alternative is to replace the UNC prefix with the mapped network drive letter whenever possible.

Yet another alternative is to simply send up $env.PWD.

Thoughts on this?

@bminer
Copy link
Author

bminer commented Dec 18, 2024

In fact, perhaps this applies to other areas of terminal integration, not just OSC 9.

@bminer
Copy link
Author

bminer commented Dec 18, 2024

Sorry, posted on the wrong Github repo. Moving...

@bminer bminer closed this as completed Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant