You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Open terminal
Run zed -w /path/to/folder
Observe that the CLI returns control immediately instead of waiting for files in the folder to be closed
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.
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
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.
Check for existing issues
Describe the bug / provide steps to reproduce it
Expected Behavior
When using
zed --wait
orzed -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
zed -w /path/to/folder
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
If applicable, attach your Zed.log file to this issue.
Zed.log
The text was updated successfully, but these errors were encountered: