can1357/oh-my-pi · error
--list-details, --exec, and --exec-batch are not supported b
Error message
--list-details, --exec, and --exec-batch are not supported by the in-process fd builtin
What it means
The in-process fd builtin rejects CLI configurations that require spawning an external process: --list-details (ls -l style output), --exec, --exec-batch, and nonzero --batch-size. These features depend on fd's process-execution machinery, which the embedded builtin deliberately does not implement.
Source
Thrown at crates/pi-builtins/src/fd.rs:610
},
}
}
}
/// Creates the `fd` builtin registration.
pub(crate) fn fd_builtin<SE: ShellExtensions>() -> Registration<SE> {
util::<FdCli, SE>()
}
fn search(
cli: FdCli,
base_dir: PathBuf,
host: &mut Host,
cancelled: &AtomicBool,
) -> io::Result<SearchState> {
if cli.list_details || !cli.exec.is_empty() || !cli.exec_batch.is_empty() || cli.batch_size != 0
{
return Err(io::Error::new(
io::ErrorKind::InvalidInput,
"--list-details, --exec, and --exec-batch are not supported by the in-process fd builtin",
));
}
let _ = (cli.color, cli.hyperlink, cli.strip_cwd_prefix);
let search_paths = resolve_search_paths(&cli, &base_dir, host)?;
let absolute_roots = search_paths
.iter()
.filter(|path| path.original.is_absolute())
.map(|path| path.resolved.clone())
.collect::<Vec<_>>();
let matcher = Arc::new(build_matcher(&cli)?);
let excludes = build_excludes(&cli.excludes)?;
let types = build_type_filter(&cli.types)?;
let sizes = build_size_filters(&cli.sizes)?;
let changed_after = cli
.changed_withinView on GitHub (pinned to 9690622007)
Solutions
- Drop --list-details/--exec/--exec-batch/--batch-size from the invocation
- Replace `fd ... --exec cmd` with `fd ... | xargs cmd` (or `xargs -I{}` per-file)
- Replace `--list-details` with `fd ... | xargs ls -l`
- If you need real fd semantics, call the standalone `fd` binary instead of the builtin
Example fix
// before fd '\.rs$' --exec cargo fmt -- // after fd '\.rs$' | xargs cargo fmt --
Defensive patterns
Strategy: validation
Validate before calling
const UNSUPPORTED = ["--list-details", "--exec", "--exec-batch", "--batch-size"];function assertBuiltinSafe(args) { for (const a of args) if (UNSUPPORTED.some(u => a === u || a.startsWith(u + "="))) throw new Error(`in-process fd does not support ${a}`); } Type guard
fn uses_exec_features(cli: &FdCli) -> bool { cli.list_details || !cli.exec.is_empty() || !cli.exec_batch.is_empty() || cli.batch_size != 0 } Try / catch
match run_fd(&cli) { Err(e) if e.to_string().contains("not supported by the in-process fd builtin") => { exec_standalone_fd(&cli); }, Err(e) => return Err(e), Ok(s) => s } Prevention
- Keep two invocations: builtin-safe fd for searching, external fd for --exec workflows
- Prefer xargs pipelines over --exec when portability matters
- Pin wrapper scripts to features the in-process builtin actually implements
When it happens
Trigger: Invoking the fd builtin with `--exec <cmd>`, `--exec-batch <cmd>`, `--list-details` (or `-l`), or setting `--batch-size` to a nonzero value.
Common situations: Users copying fd CLI one-liners into the shell builtin; scripts ported from standalone fd; aliases that always include --exec.
Related errors
- positional paths cannot be combined with --search-path
- err.to_string() (invalid glob pattern)
- err.to_string() (invalid regex pattern)
- err.to_string() (invalid exclude glob pattern)
- unknown file type: {value}
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/389683ac2b7ad6e0.
Report an issue: GitHub.