fd icon indicating copy to clipboard operation
fd copied to clipboard

Implement --list-details natively

Open tmccombs opened this issue 1 month ago • 0 comments

Currently, the --list-details option is implemented by calling ls -lhd (possibly with color).

This has a number of downsides, including poor performance, inability to work if ls is not installed (common on windows), etc.

I propose that instead of using an external tool we implement --list-details natively, probably using a similar flow to jsonl output.

Potential Challenges

  • We would need code to format the permissions to a rwx string (for example with something like https://docs.rs/unix_mode/latest/unix_mode/fn.to_string.html)
  • We would need something to print the file size in a human-readable way (https://docs.rs/humansize/latest/humansize/ ?)
  • Is the format of ls -lhd the same on platforms with non-GNU ls?
  • What does the permissions field even look like for windows?

Related Issues

  • https://github.com/sharkdp/fd/issues/1775
  • https://github.com/sharkdp/fd/issues/1595
  • https://github.com/sharkdp/fd/issues/1482
  • https://github.com/sharkdp/fd/pull/1842

tmccombs avatar Nov 23 '25 07:11 tmccombs