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

CLI --wait (-w) flag support folders (not just files) #23347

Open
1 task done
TYTheBeast opened this issue Jan 19, 2025 · 2 comments
Open
1 task done

CLI --wait (-w) flag support folders (not just files) #23347

TYTheBeast opened this issue Jan 19, 2025 · 2 comments
Labels
cli Command-line interface feedback workspace Feedback for workspace management, layout, interactions, etc

Comments

@TYTheBeast
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Expected Behavior

When using zed --wait or zed -w with folders, the CLI should wait for all files opened from that folder to be closed before returning control to the terminal, similar to how it works with individual files.

Actual Behavior

While the -w flag works correctly with individual files, when used with folders, it doesn't wait for files to be closed and returns control immediately.

Steps to Reproduce

  1. Open terminal
  2. Run zed -w /path/to/folder
  3. Observe that the CLI returns control immediately instead of waiting for files in the folder to be closed
  4. Compare with working behavior: zed -w /path/to/specific/file.txt (works as expected)

Use Case

This is particularly problematic for automation scripts (e.g., NixOS update scripts) where waiting for folder content review is necessary before proceeding.

Additional Context

The --wait functionality works as documented for individual files but seems to not extend to folder operations, which limits its usefulness in automation scripts where folder monitoring is needed.

Zed Version and System Specs

Zed: v0.168.3 (Zed)
OS: Linux Wayland nixos 24.11
Memory: 31.1 GiB
Architecture: x86_64
GPU: AMD Radeon RX 7900 XT (RADV NAVI31) || radv || Mesa 24.2.8

If applicable, add screenshots or screencasts of the incorrect state / behavior

Image

If applicable, attach your Zed.log file to this issue.

Zed.log

@TYTheBeast TYTheBeast added admin read bug [core label] labels Jan 19, 2025
@notpeter
Copy link
Member

To be explicit, you'd like zed -w foldername to block and wait until the workspace window associated with that directory is closed?

@notpeter notpeter added workspace Feedback for workspace management, layout, interactions, etc cli Command-line interface feedback feature [core label] and removed triage bug [core label] labels Jan 20, 2025
@notpeter notpeter changed the title CLI --wait (-w) flag doesn't work with folders, only individual files CLI --wait (-w) flag support folders (not just files) Jan 20, 2025
@TYTheBeast
Copy link
Author

To be explicit, you'd like zed -w foldername to block and wait until the workspace window associated with that directory is closed?

I would simply expect a different behavior than simply returning control, but I believe the details of the implementation should be left as a decision for those contributing to Zed, so I can't say much, other than my preference, that being have it wait for the window related to the terminal that Zed was called from to be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Command-line interface feedback workspace Feedback for workspace management, layout, interactions, etc
Projects
No open projects
Archived in project
Development

No branches or pull requests

2 participants