Skip to content

Commit b1f9501

Browse files
committed
update fd instructions
1 parent e52b66b commit b1f9501

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

ai/AGENTS.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
## Tools
88

99
- Always use `rg` (ripgrep) instead of `grep` for searching file contents.
10-
- Always use `fd` instead of `find` for searching files and directories.
10+
- Always use `fd` instead of `find` for searching files and directories. Key differences from `find`:
11+
- Pattern comes first, path second (opposite of `find`): `fd PATTERN [PATH]`
12+
- Patterns are regex by default; use `--glob` for glob patterns: `fd --glob '*.c'`
13+
- No `-name`, `-type`, `-path` flags needed — just: `fd foo`, `fd --type f`, `fd --type d`
14+
- Includes hidden files with `-H`; follows symlinks with `-L`
15+
- Use `--exec` instead of `-exec`: `fd --glob '*.log' --exec rm {}`
1116
- Always use the `gh` CLI when accessing or operating on GitHub resources (PRs, issues, releases, etc.).
1217
- When accessing serial ports, ALWAYS use named ports via `/dev/serial/by-id` (Linux — not macOS-style `/dev/tty.usbserial-*` paths).

0 commit comments

Comments
 (0)