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

Relative terminal links only work relative to project #7144

Closed
1 task done
porsager opened this issue Jan 31, 2024 · 2 comments
Closed
1 task done

Relative terminal links only work relative to project #7144

porsager opened this issue Jan 31, 2024 · 2 comments
Labels
defect [core label] good first issue Issue suitable for first-time contributors terminal Feedback for terminal integration, shell commands, etc

Comments

@porsager
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Relative links in terminal only looks relative to the project root, but I expected it to look relative to the cwd in the terminal rather than the project root. I actually think both could be nice, where the resolution logic would first try cwd, and then project dir.

Environment

Zed: v0.120.4 (Zed Preview)
OS: macOS 14.0.0
Memory: 32 GiB
Architecture: aarch64

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

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

If you only need the most recent lines, you can run the zed: open log command palette action to see the last 1000.

No response

@porsager porsager added admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue labels Jan 31, 2024
@SomeoneToIgnore
Copy link
Contributor

We use a two staged approach to highlight such links, represented via NewNavigationTarget event:

Event::NewNavigationTarget(maybe_navigation_target) => {

both stages (and the only two files that use this enum variant) need adjustments:

  1. terminal.rs code finds a "word" (matched with regex) hovered in alacritty terminal, and emits the event with the next word it wants to highlight in the UI.
    Terminal has a foreground_process_info with its current directory, we would need to add this to the information, hover updates trigger the update_selected_word code path.

  2. terminal_view.rs needs to check with the new information in mind in possible_open_targets and still allow falling back to workspace search in the end

@SomeoneToIgnore SomeoneToIgnore added the good first issue Issue suitable for first-time contributors label Jan 31, 2024
@JosephTLyons JosephTLyons added terminal Feedback for terminal integration, shell commands, etc and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Feb 1, 2024
SomeoneToIgnore added a commit that referenced this issue Feb 3, 2024
Allow opening file paths relative to terminal's cwd


https://github.com/zed-industries/zed/assets/67913738/413a1107-541e-4c25-ae7c-cbe45469d452


Release Notes:

- Added support for opening file paths relative to terminal's cwd
([#7144](#7144)).

---------

Co-authored-by: Kirill <kirill@zed.dev>
@SomeoneToIgnore
Copy link
Contributor

#7303 has implemented that, comes in the next preview.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect [core label] good first issue Issue suitable for first-time contributors terminal Feedback for terminal integration, shell commands, etc
Projects
None yet
Development

No branches or pull requests

3 participants