Support path pasting in terminal - #48222
Conversation
|
Hey @SomeoneToIgnore, not sure if this kind of thing would be your area of review but thought I'd reach out to see what you think? |
|
I think that should address the error. My bad on that, it was on Windows so I didn't catch it locally. |
|
Okay ran clippy locally so the test error should be fixed and I think windows should be good now. |
|
Thought it might be a good idea to make a screen record to show the result of this PR. When copy/pasting in the terminal you can get the whole path (or just the text) to the item copied from Finder with both the keyboard and mouse: path_pasting_screen_recording.mov |
|
I pulled this locally and confirmed that it does succeed at implementing pasting filepaths from finder, so we should be able to merge this. It will need to have main merged since there are a couple conflicts, and pass tests, but feel free to ping me and I'll make sure they're running so we can get this in. |
fad76ef to
fb92a8c
Compare
|
Hey @ChristopherBiscardi, sorry it took me so long to get back to this, but I've updated the PR. There were a bunch of changes since I first made this, it actually is much simpler to do now since path handling has been added to the macOS clipboard. It also took advantage of I haven't tested this on Windows, but I think it should work. If the tests show a problem or you see anything you'd like me to change I'd be happy to do so! |
|
I was able to test this out on Windows and it works 👍 I think the error from CI doesn't have to do with this PR? |
|
CI failure seemed like a networking issue. I kicked it off again. |
|
This is how drag and drop was handled already so I thought it would be better to have it be consistent. This way uses |
ChristopherBiscardi
left a comment
There was a problem hiding this comment.
yep that makes sense to me, thanks!
4b3c0cd
|
Thanks! |
This adds the functionality to support pasting the file path of an item when the copied item supports it. This mirrors the behavior of `Terminal.app` on macOS. This only implements the functionality on macOS but could be extended to other platforms. I find this convenient when I'm using Finder to navigate around the file system and I want to copy a directory or file path and put it in the terminal. You can copy the item from Finder and paste it into the terminal and it will write out the full path of the item, making it easy to change directories or provide path parameters to commands. Release Notes: - Added path pasting functionality in terminal
|
Works on GNU/Linux too (debian) 👌 |
This adds the functionality to support pasting the file path of an item when the copied item supports it. This mirrors the behavior of `Terminal.app` on macOS. This only implements the functionality on macOS but could be extended to other platforms. I find this convenient when I'm using Finder to navigate around the file system and I want to copy a directory or file path and put it in the terminal. You can copy the item from Finder and paste it into the terminal and it will write out the full path of the item, making it easy to change directories or provide path parameters to commands. Release Notes: - Added path pasting functionality in terminal
This adds the functionality to support pasting the file path of an item when the copied item supports it. This mirrors the behavior of `Terminal.app` on macOS. This only implements the functionality on macOS but could be extended to other platforms. I find this convenient when I'm using Finder to navigate around the file system and I want to copy a directory or file path and put it in the terminal. You can copy the item from Finder and paste it into the terminal and it will write out the full path of the item, making it easy to change directories or provide path parameters to commands. Release Notes: - Added path pasting functionality in terminal


This adds the functionality to support pasting the file path of an item when the copied item supports it. This mirrors the behavior of
Terminal.appon macOS.This only implements the functionality on macOS but could be extended to other platforms.
I find this convenient when I'm using Finder to navigate around the file system and I want to copy a directory or file path and put it in the terminal. You can copy the item from Finder and paste it into the terminal and it will write out the full path of the item, making it easy to change directories or provide path parameters to commands.
Release Notes: