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

Drag + drop files and folders to terminal to print path #5700

Closed
1 task done
Daeraxa opened this issue Aug 31, 2022 · 2 comments
Closed
1 task done

Drag + drop files and folders to terminal to print path #5700

Daeraxa opened this issue Aug 31, 2022 · 2 comments
Labels
enhancement [core label] terminal Feedback for terminal integration, shell commands, etc

Comments

@Daeraxa
Copy link

Daeraxa commented Aug 31, 2022

Check for existing issues

  • Completed

Is your feature request related to a problem?

This is a feature I've used quite a lot in an Atom terminal package which I really like, with a terminal open you can drag files or folders onto it and it will insert the path to it. It is really useful if you have a file browser open or even just the project tree, you can just drag and drop files to quickly set the path of whatever you are trying to run.

I think VSCode also does this by default.

Describe the solution you'd like

Drag a file from either the project pane or a file browser and drop it onto the terminal.
The terminal will then print the path onto the prompt - adding quotes if necessary due to spaces etc. in the path.

Maybe a modifier could be used to execute an action at the same time, for example if you held alt it would automatically cd to that directory (or if a file, the parent directory).

Another modifier could be used to control whether the printed path is the full path or the relative one e.g if my prompt was in ~/dev/project1/src then dragging a cargo.toml from the parent directory would print ../cargo.toml but if modified it would print /home/user/dev/project1/cargo.toml.

If applicable, add mockups / screenshots to help present your vision of the feature

No response

@Daeraxa Daeraxa added enhancement [core label] triage Maintainer needs to classify the issue labels Aug 31, 2022
@JosephTLyons JosephTLyons added terminal Feedback for terminal integration, shell commands, etc and removed triage Maintainer needs to classify the issue labels Aug 31, 2022
@mikayla-maki mikayla-maki mentioned this issue Sep 13, 2022
64 tasks
@mikayla-maki
Copy link
Contributor

This is blocked on having better file handling all around in Zed, I'll make sure to keep an eye on it when that work happens though :)

@mikayla-maki mikayla-maki mentioned this issue Oct 17, 2022
40 tasks
@mikayla-maki mikayla-maki mentioned this issue Dec 4, 2022
48 tasks
SomeoneToIgnore referenced this issue Jan 7, 2024
Deals with https://github.com/zed-industries/community/issues/1317
Deals with https://github.com/zed-industries/community/issues/486

Reworks pane drag and drop code to support 
* dropping external files into main pane (supports splits same as tabs
and project entries drop) — this will open the file dropped
* dropping external files, tabs and project entries drop into the
terminal — this will add file abs path into the terminal

Release Notes:

- Added a way to drag and drop external files into Zed main & terminal
panes; support tabs and project entries drop into terminal pane
@JosephTLyons
Copy link
Contributor

This is implemented in v0.119.4 preview.

@JosephTLyons JosephTLyons transferred this issue from zed-industries/community Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement [core label] terminal Feedback for terminal integration, shell commands, etc
Projects
None yet
Development

No branches or pull requests

3 participants