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
Within `qshr!`, any Rust statement is permitted, so you can loop, branch, or shadow variables while the string literals do the repetitive shell work for you.
When you need to stream data into a child process (large files, sockets, pipes),
155
+
`stdin_reader` avoids buffering everything into memory up front.
156
+
157
+
### 7. Lazy filesystem helpers
141
158
142
159
Every filesystem iterator (`ls`, `walk_files`, `glob_entries`, etc.) yields a `Shell<Result<_>>`, so you can lazily stream and short-circuit as needed:
143
160
@@ -224,6 +241,10 @@ if let Ok(event) = rx.try_recv() {
224
241
}
225
242
```
226
243
244
+
Rename operations surface as `WatchEvent::Renamed`, giving you access to both
245
+
`event.path()` (the destination) and `event.from_path()` for the source when
246
+
files move without being rewritten.
247
+
227
248
When you need to reuse glob metadata multiple times (copy/move operations, filtering), resolve once via `GlobCache::new("src/**/*.rs")` and call `.entries()` to avoid repeated `fs::metadata` calls.
228
249
229
250
Need backwards iteration? Wrap in `DoubleEndedShell::from_vec(vec)` and call `next_back()` on it before converting back into a plain `Shell`.
@@ -243,8 +264,8 @@ Browse `examples/` for small scripts—`script.rs`, `watch_glob.rs`,
243
264
## Git hooks
244
265
245
266
There is a repo-local pre-commit hook at `.githooks/pre-commit` that runs
0 commit comments