Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions apps/public-docs/with-watch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,43 @@ with-watch exec --input 'src/**/*.rs' -- cargo test -p with-watch
- Safe pathless defaults are intentionally narrow: `ls`, `dir`, `vdir`, `du`, and `find`.
- If `with-watch` cannot infer safe filesystem inputs, it fails instead of guessing.

## Recognized command inventory

`with-watch --help` includes the full recognized command inventory in analyzer order.

Wrapper commands:

- `env`, `nice`, `nohup`, `stdbuf`, `timeout`

Dedicated built-in adapters and aliases:

- `cp`, `mv`, `install`, `ln`, `link`, `rm`, `unlink`, `rmdir`, `shred`
- `sort`, `uniq`, `split`, `csplit`, `tee`
- `grep`, `egrep`, `fgrep`, `sed`
- `awk`, `gawk`, `mawk`, `nawk`
- `find`, `xargs`, `tar`, `touch`, `truncate`
- `chmod`, `chown`, `chgrp`, `dd`

Generic read-path commands:

- `cat`, `tac`, `head`, `tail`, `wc`, `nl`, `od`, `cut`, `fmt`, `fold`, `paste`, `pr`, `tr`
- `expand`, `unexpand`, `stat`, `readlink`, `realpath`
- `md5sum`, `b2sum`, `cksum`, `sum`, `sha1sum`, `sha224sum`, `sha256sum`, `sha384sum`
- `sha512sum`, `sha512_224sum`, `sha512_256sum`
- `base32`, `base64`, `basenc`, `comm`, `join`, `cmp`, `tsort`, `shuf`

Safe current-directory defaults:

- `find`, `ls`, `dir`, `vdir`, `du`

Recognized but not auto-watchable commands:

- `echo`, `printf`, `seq`, `yes`, `sleep`, `date`, `uname`, `pwd`, `true`, `false`
- `basename`, `dirname`, `nproc`, `printenv`, `whoami`, `logname`, `users`, `hostid`
- `numfmt`, `mktemp`, `mkdir`, `mkfifo`, `mknod`

These commands are recognized, but they do not expose stable filesystem inputs on their own. Use `exec --input` when you want explicit watch inputs.

## When exec --input is required

Some commands do not expose meaningful filesystem inputs on their own. For example, `echo hello` has nothing safe to watch.
Expand Down
37 changes: 37 additions & 0 deletions crates/with-watch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,43 @@ with-watch exec --input 'src/**/*.rs' -- cargo test -p with-watch
- Pathless defaults are intentionally narrow: only `ls`, `dir`, `vdir`, `du`, and `find` implicitly watch the current directory.
- `exec --input` remains the explicit escape hatch when a delegated command has no meaningful filesystem inputs or when fallback inference would be ambiguous.

## Recognized command inventory

`with-watch --help` lists the full recognized command inventory in the same order as the analyzer.

Wrapper commands:

- `env`, `nice`, `nohup`, `stdbuf`, `timeout`

Dedicated built-in adapters and aliases:

- `cp`, `mv`, `install`, `ln`, `link`, `rm`, `unlink`, `rmdir`, `shred`
- `sort`, `uniq`, `split`, `csplit`, `tee`
- `grep`, `egrep`, `fgrep`, `sed`
- `awk`, `gawk`, `mawk`, `nawk`
- `find`, `xargs`, `tar`, `touch`, `truncate`
- `chmod`, `chown`, `chgrp`, `dd`

Generic read-path commands:

- `cat`, `tac`, `head`, `tail`, `wc`, `nl`, `od`, `cut`, `fmt`, `fold`, `paste`, `pr`, `tr`
- `expand`, `unexpand`, `stat`, `readlink`, `realpath`
- `md5sum`, `b2sum`, `cksum`, `sum`, `sha1sum`, `sha224sum`, `sha256sum`, `sha384sum`
- `sha512sum`, `sha512_224sum`, `sha512_256sum`
- `base32`, `base64`, `basenc`, `comm`, `join`, `cmp`, `tsort`, `shuf`

Safe current-directory defaults:

- `find`, `ls`, `dir`, `vdir`, `du`

Recognized but not auto-watchable commands:

- `echo`, `printf`, `seq`, `yes`, `sleep`, `date`, `uname`, `pwd`, `true`, `false`
- `basename`, `dirname`, `nproc`, `printenv`, `whoami`, `logname`, `users`, `hostid`
- `numfmt`, `mktemp`, `mkdir`, `mkfifo`, `mknod`

These commands are recognized, but they do not expose stable filesystem inputs on their own. Use `exec --input` when you want them to rerun from explicit globs or paths.

## When to use exec --input

Use `exec --input` when the delegated command does not read a stable filesystem input by itself, or when you want the watch set to be explicit.
Expand Down
Loading
Loading