dune icon indicating copy to clipboard operation
dune copied to clipboard

Add --filenames-only to dune describe opam-files

Open reynir opened this issue 2 years ago • 1 comments

This flag makes dune describe opam-files only print the opam file names, each on their own line. This is useful for shell scripts where parsing sexp can be somewhat complicated.

The flag unfortunately ignores the --format argument. Another option could be to add a NUL-byte delimited format assuming none of the output would include NUL bytes (which I'm not sure is a reasonable assumption).

reynir avatar Jan 22 '24 08:01 reynir

Actually I'm wondering if we should make format per-command so that your PR could be expressed as just --format=lines.

(also, you'll need to sign-off your contribution as described in https://github.com/ocaml/dune/blob/main/CONTRIBUTING.md)

emillon avatar Jan 22 '24 13:01 emillon

@reynir I've renamed the flag to --files, done some cleanup and rebased with a changelog. Thanks for the contribution!

Alizter avatar Aug 30 '25 15:08 Alizter