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_within

View on GitHub (pinned to 9690622007)

Solutions

  1. Drop --list-details/--exec/--exec-batch/--batch-size from the invocation
  2. Replace `fd ... --exec cmd` with `fd ... | xargs cmd` (or `xargs -I{}` per-file)
  3. Replace `--list-details` with `fd ... | xargs ls -l`
  4. 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

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


AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31). Data as JSON: /api/errors/389683ac2b7ad6e0. Report an issue: GitHub.