Compare commits

...

194 Commits

Author SHA1 Message Date
Thayne McCombs 7027d45303 Merge pull request #1916 from tmccombs/release-v10.4.2
chore: Bump to 10.4.2
2026-03-10 01:32:25 -06:00
Thayne McCombs bf6489a79b chore: Bump to 10.4.2 2026-03-09 01:56:38 -06:00
Thayne McCombs cb3fad48bb Merge pull request #1914 from tmccombs/faster-ignore-contains
perf: Avoid unnecessary syscall for ignore-contain
2026-03-08 19:44:38 -06:00
Thayne McCombs a4d86cc1f5 perf: Avoid unnecessary syscall for ignore-contain
Instead of calling `is_dir` on the path, call it on the file_type of the
DirEntry, since we should already have that information without needing
to do another syscall.

Fixes: #1913
2026-03-08 17:09:39 -06:00
Tavian Barnes b691572928 Merge pull request #1912 from tmccombs/changelog-bump
Add upcoming to changelog
2026-03-08 07:58:54 -04:00
Thayne McCombs ec25d2bc81 Add upcoming to changelog 2026-03-08 03:09:13 -06:00
Thayne McCombs 4ea110d8dd Merge pull request #1911 from tmccombs/release-10.4.1
Prepare 10.4.1 release
2026-03-08 01:38:40 -07:00
Thayne McCombs d766e76351 Prepare 10.4.1 release 2026-03-08 01:02:24 -07:00
Thayne McCombs aa35ef4e45 Merge pull request #1904 from tmccombs/fix-deploy
fix(build): Fix attestation
2026-03-07 12:38:21 -07:00
Thayne McCombs b87d919244 fix(build): Remove extra colons 2026-03-07 11:55:38 -07:00
Thayne McCombs bb3d57c433 fix(build): Fix attestation
Use the right output in the github action.

Also pin the versions of the upload-artifact and attest actions.
2026-03-07 01:34:30 -07:00
Thayne McCombs ff1f66cceb Merge pull request #1901 from sharkdp/dependabot/github_actions/actions/attest-build-provenance-4
build(deps): bump actions/attest-build-provenance from 3 to 4
2026-03-06 20:20:54 -07:00
dependabot[bot] d9fc3272db build(deps): bump actions/attest-build-provenance from 3 to 4
Bumps [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance) from 3 to 4.
- [Release notes](https://github.com/actions/attest-build-provenance/releases)
- [Changelog](https://github.com/actions/attest-build-provenance/blob/main/RELEASE.md)
- [Commits](https://github.com/actions/attest-build-provenance/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/attest-build-provenance
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-06 17:43:08 +00:00
Thayne McCombs c60d0076db Merge pull request #1893 from tmccombs/release-10.4.0
chore(release): Prepare for 10.4.0
2026-03-01 11:45:20 -07:00
Thayne McCombs 801ccd7620 chore(release): Prepare for 10.4.0 2026-02-28 23:31:48 -07:00
Thayne McCombs a07ad51751 Merge pull request #1891 from FidelSch/c-static-link
config: statically link C runtime for Windows MSVC
2026-02-24 10:51:08 -07:00
FidelSch 6067f72742 docs: update changelog to include static linking of CRT for MSVC builds 2026-02-24 10:18:59 -03:00
FidelSch 73e6f95416 config: static linking of C runtime on Windows MSVC 2026-02-24 10:13:42 -03:00
Thayne McCombs 40d8eb30bc Merge pull request #1861 from tmccombs/faster-dev-compile
build: Reduce debug info for dev builds
2026-02-02 19:02:50 -07:00
Thayne McCombs 38986aa42c Merge pull request #1881 from sharkdp/dependabot/cargo/jiff-0.2.18
build(deps): bump jiff from 0.2.17 to 0.2.18
2026-02-01 22:23:48 -07:00
dependabot[bot] 171438be2d build(deps): bump jiff from 0.2.17 to 0.2.18
Bumps [jiff](https://github.com/BurntSushi/jiff) from 0.2.17 to 0.2.18.
- [Release notes](https://github.com/BurntSushi/jiff/releases)
- [Changelog](https://github.com/BurntSushi/jiff/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/jiff/compare/jiff-static-0.2.17...jiff-static-0.2.18)

---
updated-dependencies:
- dependency-name: jiff
  dependency-version: 0.2.18
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-01 23:34:19 +00:00
Thayne McCombs fe0e173e9e Merge pull request #1880 from sharkdp/dependabot/cargo/filetime-0.2.27
build(deps): bump filetime from 0.2.26 to 0.2.27
2026-02-01 16:31:38 -07:00
Thayne McCombs 9a9c4b921d Merge pull request #1882 from sharkdp/dependabot/cargo/nix-0.31.1
build(deps): bump nix from 0.30.1 to 0.31.1
2026-02-01 16:31:11 -07:00
Thayne McCombs efd9f05fcb Merge pull request #1879 from sharkdp/dependabot/cargo/libc-0.2.180
build(deps): bump libc from 0.2.178 to 0.2.180
2026-02-01 16:29:14 -07:00
Thayne McCombs ccafbbb08a Merge pull request #1878 from sharkdp/dependabot/cargo/clap-4.5.54
build(deps): bump clap from 4.5.53 to 4.5.54
2026-02-01 16:27:17 -07:00
dependabot[bot] 74c389f847 build(deps): bump nix from 0.30.1 to 0.31.1
Bumps [nix](https://github.com/nix-rust/nix) from 0.30.1 to 0.31.1.
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/compare/v0.30.1...v0.31.1)

---
updated-dependencies:
- dependency-name: nix
  dependency-version: 0.31.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-01 17:42:47 +00:00
dependabot[bot] 2fc76da442 build(deps): bump filetime from 0.2.26 to 0.2.27
Bumps [filetime](https://github.com/alexcrichton/filetime) from 0.2.26 to 0.2.27.
- [Commits](https://github.com/alexcrichton/filetime/compare/0.2.26...0.2.27)

---
updated-dependencies:
- dependency-name: filetime
  dependency-version: 0.2.27
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-01 17:42:36 +00:00
dependabot[bot] b22a46c103 build(deps): bump libc from 0.2.178 to 0.2.180
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.178 to 0.2.180.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Changelog](https://github.com/rust-lang/libc/blob/0.2.180/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.178...0.2.180)

---
updated-dependencies:
- dependency-name: libc
  dependency-version: 0.2.180
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-01 17:42:28 +00:00
dependabot[bot] 1586dabeee build(deps): bump clap from 4.5.53 to 4.5.54
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.53 to 4.5.54.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.53...clap_complete-v4.5.54)

---
updated-dependencies:
- dependency-name: clap
  dependency-version: 4.5.54
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-01 17:42:21 +00:00
Thayne McCombs 0a094a883f Merge pull request #1877 from littleKitchen/docs/update-completions-readme
docs: update shell completions instructions in README
2026-01-30 08:46:50 -07:00
Yuxuan Che 4410dda6e4 docs: add shell completion generation instructions
Add documentation for generating completions using fd --gen-completions,
while keeping and clarifying the existing instructions for pre-built
completions from release archives.

- Clarify that pre-built completions are in release archives (autocomplete dir)
- Add new section for generating completions with fd --gen-completions
- Include examples for bash, zsh, fish, and powershell
2026-01-29 21:33:12 -08:00
Thayne McCombs bf81fb98fa Merge pull request #1852 from fischman/1727-ignore-contain
`--ignore-contain`: ignore directories containing a named entry.
2026-01-20 00:48:43 -07:00
Thayne McCombs 9508153471 Merge pull request #1862 from jylenhof/master
docs(README): add mise alternative method installation
2026-01-20 00:42:34 -07:00
Thayne McCombs 1a37650b2c Merge pull request #1872 from josephadamsdev/fix-1843-windows-hyperlink-slash
Fix Windows hyperlinks for paths with spaces
2026-01-16 09:04:56 -07:00
Joseph Adams dcc5ff84cd Update CHANGELOG.md 2026-01-16 10:44:01 +01:00
Joseph Adams 9c9eeda209 Update CHANGELOG.md 2026-01-16 10:38:42 +01:00
Joseph Adams 4ba10c7837 Add changelog entry for Windows hyperlink fix 2026-01-16 10:37:21 +01:00
Joseph Adams 2efd99bc52 Update hyperlink test for Windows file URLs 2026-01-15 10:12:16 +01:00
Joseph Adams cd8fedc183 Fix Windows hyperlinks for paths with spaces
Fixes #1843

Changed the host() function for Windows to return '/' instead of ''
to generate RFC 3986 compliant file URLs with three slashes.

Before: file://C:/test/hi%20there.txt (broken)
After:  file:///C:/test/hi%20there.txt (works)

This fixes hyperlinks failing on Windows when file paths contain
spaces or other characters that require percent-encoding.
2026-01-14 23:53:43 +01:00
Ami Fischman f3a8bb7ce6 ignore_contain now has higher precedence than root check. 2026-01-14 07:58:30 -08:00
Ami Fischman 1df183e0cd cargo fmt 2026-01-13 16:37:11 -08:00
Ami Fischman 1993c76971 Fixes for tmccombs review comments. 2026-01-13 16:16:11 -08:00
Thayne McCombs 5f95a78121 Merge pull request #1870 from sharkdp/dependabot/cargo/libc-0.2.178
build(deps): bump libc from 0.2.177 to 0.2.178
2026-01-01 12:28:48 -07:00
Thayne McCombs 49ded38b8a Merge pull request #1869 from sharkdp/dependabot/cargo/tempfile-3.24.0
build(deps): bump tempfile from 3.23.0 to 3.24.0
2026-01-01 12:27:39 -07:00
Thayne McCombs 9907632b89 Merge pull request #1868 from sharkdp/dependabot/cargo/jiff-0.2.17
build(deps): bump jiff from 0.2.16 to 0.2.17
2026-01-01 11:07:50 -07:00
dependabot[bot] 8ec9d3115e build(deps): bump libc from 0.2.177 to 0.2.178
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.177 to 0.2.178.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Changelog](https://github.com/rust-lang/libc/blob/0.2.178/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.177...0.2.178)

---
updated-dependencies:
- dependency-name: libc
  dependency-version: 0.2.178
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-01 17:01:32 +00:00
dependabot[bot] 96502d2611 build(deps): bump tempfile from 3.23.0 to 3.24.0
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.23.0 to 3.24.0.
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.23.0...v3.24.0)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-version: 3.24.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-01 17:01:24 +00:00
dependabot[bot] 6c5267e240 build(deps): bump jiff from 0.2.16 to 0.2.17
Bumps [jiff](https://github.com/BurntSushi/jiff) from 0.2.16 to 0.2.17.
- [Release notes](https://github.com/BurntSushi/jiff/releases)
- [Changelog](https://github.com/BurntSushi/jiff/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/jiff/compare/jiff-static-0.2.16...jiff-static-0.2.17)

---
updated-dependencies:
- dependency-name: jiff
  dependency-version: 0.2.17
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-01 17:01:19 +00:00
Thayne McCombs 84789bfe57 Merge pull request #1864 from sergii4/update-clap-complete-4.5.62
build(deps): bump clap_complete from 4.5.61 to 4.5.62
2025-12-25 08:04:24 -07:00
Sergii Getman 19dcbff562 build(deps): bump clap_complete from 4.5.61 to 4.5.62
This update fixes fish shell completion formatting issues where
ValueEnum descriptions were not properly separated with tabs,
causing fish to fail parsing the completions.

The fix was introduced in clap-rs/clap#5874 which changed the
fish completion generator to use proper multi-line format with
quotes instead of the brace format.

Fixes fish shell completions for options like --type and --color
that have enum values with descriptions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-25 14:48:02 +00:00
jylenhof e311e503ba docs(README): add mise alternative method installation
Signed-off-by: jylenhof <jygithub@lenhof.eu.org>
2025-12-15 22:53:01 +01:00
Thayne McCombs bd33bc0eb6 build: Reduce debug info for dev builds
Hopefully this will sped up dev builds. Adds a new debugging profile if
full debug symbols are needed.
2025-12-13 00:04:05 -07:00
Thayne McCombs f5b4171631 Merge pull request #1859 from sharkdp/dependabot/github_actions/softprops/action-gh-release-2.5.0
build(deps): bump softprops/action-gh-release from 2.4.1 to 2.5.0
2025-12-08 10:58:55 -07:00
dependabot[bot] 16e5d9b816 build(deps): bump softprops/action-gh-release from 2.4.1 to 2.5.0
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.4.1 to 2.5.0.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/6da8fa9354ddfdc4aeace5fc48d7f679b5214090...a06a81a03ee405af7f2048a818ed3f03bbf83c7b)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-version: 2.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-08 17:06:22 +00:00
Thayne McCombs c90994b36a Merge pull request #1853 from sharkdp/dependabot/cargo/clap_complete-4.5.61
build(deps): bump clap_complete from 4.5.60 to 4.5.61
2025-12-02 10:46:34 -07:00
dependabot[bot] 728b380c67 build(deps): bump clap_complete from 4.5.60 to 4.5.61
Bumps [clap_complete](https://github.com/clap-rs/clap) from 4.5.60 to 4.5.61.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.60...clap_complete-v4.5.61)

---
updated-dependencies:
- dependency-name: clap_complete
  dependency-version: 4.5.61
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-02 04:06:28 +00:00
Thayne McCombs 2d9c8dab31 Merge pull request #1855 from sharkdp/dependabot/cargo/clap-4.5.53
build(deps): bump clap from 4.5.51 to 4.5.53
2025-12-01 20:43:19 -07:00
Thayne McCombs 161f3ba7cd Merge pull request #1854 from sharkdp/dependabot/cargo/jiff-0.2.16
build(deps): bump jiff from 0.2.15 to 0.2.16
2025-12-01 20:42:35 -07:00
dependabot[bot] e2ae9e88b2 build(deps): bump clap from 4.5.51 to 4.5.53
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.51 to 4.5.53.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.51...clap_complete-v4.5.53)

---
updated-dependencies:
- dependency-name: clap
  dependency-version: 4.5.53
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 18:42:58 +00:00
dependabot[bot] a06417d355 build(deps): bump jiff from 0.2.15 to 0.2.16
Bumps [jiff](https://github.com/BurntSushi/jiff) from 0.2.15 to 0.2.16.
- [Release notes](https://github.com/BurntSushi/jiff/releases)
- [Changelog](https://github.com/BurntSushi/jiff/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/jiff/compare/jiff-static-0.2.15...jiff-static-0.2.16)

---
updated-dependencies:
- dependency-name: jiff
  dependency-version: 0.2.16
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 18:42:52 +00:00
Ami Fischman d05a718be5 --ignore-contain: ignore directories containing a named entry (e.g. [CACHEDIR.TAG](https://bford.info/cachedir/)).
Fixes #1727.
2025-11-28 11:49:37 -08:00
Thayne McCombs e3a6f8b7e7 Merge pull request #1850 from sharkdp/dependabot/github_actions/actions/checkout-6
build(deps): bump actions/checkout from 5 to 6
2025-11-27 10:22:24 -07:00
dependabot[bot] 76046b23b0 build(deps): bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-27 17:05:20 +00:00
Thayne McCombs 098bb568e1 Merge pull request #1849 from bigmoonbit/master
chore: fix typo in tests/tests.rs
2025-11-27 00:34:21 -07:00
bigmoonbit 1fb1cafc15 chore: fix typo in tests/tests.rs
Signed-off-by: bigmoonbit <bigmoonbit@outlook.com>
2025-11-27 15:00:09 +08:00
Tavian Barnes 8661ac473c Merge pull request #1839 from andstepan/fix/read-bin-from-environment
tests/testenv/mod.rs: Change how fd binary executable is located
2025-11-18 07:18:18 -05:00
Andreas Stergiopoulos b6af107ac6 tests/testenv/mod.rs: Change how fd binary executable is located
This commit changes the way that the binary executable of fd is located
during integration tests. Previously, the find_fd_exe function would just
navigate in the parent directory and try to find the binary here. This
method is not appropriate as it assumes that the test directory will have
the same layout as the build directory, which also leaks the build time
configuration.

With this patch, the location of the binary executable is read using the
CARGO_BIN_EXE_fd environment variable. The code at first tries to read
the variable at run time, and if it is not available it then uses the env!
macro which returns the value of the variable exposed at compile time.

This way of reading the binary location makes the code more flexible and
friendlier to cross compile.

This commit closes #1838 .

Signed-off-by: Andreas Stergiopoulos <andreas.stergiopoulos@smile.fr>
2025-11-18 10:25:35 +01:00
Thayne McCombs 491baaa2d1 Merge pull request #1834 from tmccombs/cross-install
cross install
2025-11-11 00:09:02 -07:00
Thayne McCombs 68fa2dbaed feat(build): Install cross directly
Removes a dependency on an action repo.

This works similarly to how ripgrep currently installs cross.
2025-11-11 00:02:33 -07:00
Tavian Barnes 15b57b9e78 Merge pull request #1833 from tmccombs/build-fixes
fix[build]: Fix syntax of github action
2025-11-09 18:06:33 -05:00
Thayne McCombs 3b32256715 fix[build]: Fix syntax of github action 2025-11-09 15:51:16 -07:00
Tavian Barnes 32f9fd3314 Merge pull request #1832 from sharkdp/dependabot/cargo/globset-0.4.18
build(deps): bump globset from 0.4.17 to 0.4.18
2025-11-09 09:45:31 -05:00
Tavian Barnes cfc4ace4f4 Merge pull request #1831 from sharkdp/dependabot/cargo/lscolors-0.21.0
build(deps): bump lscolors from 0.20.0 to 0.21.0
2025-11-09 09:45:17 -05:00
Tavian Barnes 7fdfd40107 Merge pull request #1830 from sharkdp/dependabot/cargo/ignore-0.4.25
build(deps): bump ignore from 0.4.24 to 0.4.25
2025-11-09 09:45:03 -05:00
dependabot[bot] d7bfcf48b8 build(deps): bump globset from 0.4.17 to 0.4.18
Bumps [globset](https://github.com/BurntSushi/ripgrep) from 0.4.17 to 0.4.18.
- [Release notes](https://github.com/BurntSushi/ripgrep/releases)
- [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/ripgrep/compare/globset-0.4.17...globset-0.4.18)

---
updated-dependencies:
- dependency-name: globset
  dependency-version: 0.4.18
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-09 09:16:26 +00:00
dependabot[bot] 942b68ea3b build(deps): bump lscolors from 0.20.0 to 0.21.0
Bumps [lscolors](https://github.com/sharkdp/lscolors) from 0.20.0 to 0.21.0.
- [Release notes](https://github.com/sharkdp/lscolors/releases)
- [Commits](https://github.com/sharkdp/lscolors/compare/v0.20.0...v0.21.0)

---
updated-dependencies:
- dependency-name: lscolors
  dependency-version: 0.21.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-09 09:16:21 +00:00
dependabot[bot] e08038c34c build(deps): bump ignore from 0.4.24 to 0.4.25
Bumps [ignore](https://github.com/BurntSushi/ripgrep) from 0.4.24 to 0.4.25.
- [Release notes](https://github.com/BurntSushi/ripgrep/releases)
- [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/ripgrep/compare/ignore-0.4.24...ignore-0.4.25)

---
updated-dependencies:
- dependency-name: ignore
  dependency-version: 0.4.25
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-09 09:16:14 +00:00
Thayne McCombs 2f5ab52897 Merge pull request #1828 from HastD/zizmor
ci: resolve Zizmor-identified workflow issues
2025-11-09 02:15:24 -07:00
Thayne McCombs 19e752d184 Merge pull request #1829 from jaideepkathiresan/docs/security-policy
docs(security): clarify where to send vulnerability reports (#1827)
2025-11-09 00:47:21 -07:00
jaideepkathiresan c3652afc2b docs(security): clarify where to send vulnerability reports (#1827) 2025-11-09 09:22:18 +05:30
Daniel Hast 7014993561 ci: resolve Zizmor-identified workflow issues
* Set dependabot cooldown timer of 7 days, which helps mitigate
  stability and supply-chain security risks. For more info, see
  https://docs.zizmor.sh/audits/#dependabot-cooldown
* Restrict write permissions to the job that actually needs them.
* Set `persist-credentials: false` for `actions/checkout`. See
  https://docs.zizmor.sh/audits/#artipacked
* Use environment variables instead of template expansions in code
  contexts. See https://docs.zizmor.sh/audits/#template-injection
* Pin action dependencies to SHA hashes.
2025-11-06 11:48:12 -05:00
Thayne McCombs 72e54e8e9e Merge pull request #1824 from sharkdp/dependabot/cargo/ctrlc-3.5.1
build(deps): bump ctrlc from 3.5.0 to 3.5.1
2025-11-03 23:29:19 -07:00
Thayne McCombs cd95cfcfe0 Merge pull request #1826 from sharkdp/dependabot/cargo/clap_complete-4.5.60
build(deps): bump clap_complete from 4.5.59 to 4.5.60
2025-11-01 13:23:55 -06:00
Thayne McCombs 78a34dd1e9 Merge pull request #1825 from sharkdp/dependabot/cargo/clap-4.5.51
build(deps): bump clap from 4.5.50 to 4.5.51
2025-11-01 13:23:29 -06:00
Thayne McCombs e7e78d7b6a Merge pull request #1823 from sharkdp/dependabot/cargo/aho-corasick-1.1.4
build(deps): bump aho-corasick from 1.1.3 to 1.1.4
2025-11-01 13:22:58 -06:00
dependabot[bot] a19c874fee build(deps): bump clap_complete from 4.5.59 to 4.5.60
Bumps [clap_complete](https://github.com/clap-rs/clap) from 4.5.59 to 4.5.60.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.59...clap_complete-v4.5.60)

---
updated-dependencies:
- dependency-name: clap_complete
  dependency-version: 4.5.60
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-01 17:01:20 +00:00
dependabot[bot] 90c94a2ea9 build(deps): bump clap from 4.5.50 to 4.5.51
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.50 to 4.5.51.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.50...clap_complete-v4.5.51)

---
updated-dependencies:
- dependency-name: clap
  dependency-version: 4.5.51
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-01 17:01:14 +00:00
dependabot[bot] 73a470d076 build(deps): bump ctrlc from 3.5.0 to 3.5.1
Bumps [ctrlc](https://github.com/Detegr/rust-ctrlc) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/Detegr/rust-ctrlc/releases)
- [Commits](https://github.com/Detegr/rust-ctrlc/compare/3.5.0...3.5.1)

---
updated-dependencies:
- dependency-name: ctrlc
  dependency-version: 3.5.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-01 17:01:08 +00:00
dependabot[bot] 7c2584b11d build(deps): bump aho-corasick from 1.1.3 to 1.1.4
Bumps [aho-corasick](https://github.com/BurntSushi/aho-corasick) from 1.1.3 to 1.1.4.
- [Commits](https://github.com/BurntSushi/aho-corasick/compare/1.1.3...1.1.4)

---
updated-dependencies:
- dependency-name: aho-corasick
  dependency-version: 1.1.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-01 17:01:03 +00:00
Thayne McCombs 1d85f3be67 Merge pull request #1821 from tmccombs/changelog-updates
docs(CHANGELOG): list bugs fixed by ignore upgrade
2025-11-01 00:40:35 -06:00
Thayne McCombs a836d865f0 Merge pull request #1820 from tmccombs/etc-upgrade
chore(deps): Update etcetera package
2025-11-01 00:40:14 -06:00
Thayne McCombs f360a772b0 docs(CHANGELOG): list bugs fixed by ignore upgrade 2025-10-31 00:52:05 -06:00
Thayne McCombs 202db498c0 chore(deps): Update etcetera package
Which allows removing a dependency on home
2025-10-31 00:08:52 -06:00
Thayne McCombs d23ac06e40 Merge pull request #1813 from tmccombs/rust-version
Rust version
2025-10-27 23:57:53 -06:00
Thayne McCombs dbd3e3c14c build(msrv): Update msrv to 1.90.0
And upgrade to 2024 edition
2025-10-27 02:05:37 -06:00
Thayne McCombs da731c48d9 build(deps): bump ignore to 0.4.24
This should hopefully fix some bugs around gitignore.

Also run `cargo update` to update the lockfile
2025-10-27 02:02:58 -06:00
Thayne McCombs 5558e407be Merge pull request #1805 from tmccombs/exec-nuls
fix: --print0 now works with --exec
2025-10-25 23:49:24 -06:00
Thayne McCombs f77b693db2 Merge pull request #1810 from Sambhram1/master
"Add cargo-binstall support"
2025-10-17 13:09:58 -06:00
Sambhram 9842656b2b "Add cargo-binstall support" 2025-10-17 16:50:14 +00:00
Thayne McCombs 97b3b0404e Merge pull request #1809 from tmccombs/attestation
feat[release]: Add attestation for release artifacts
2025-10-15 16:27:39 -06:00
Thayne McCombs 54fa0112f5 Merge pull request #1808 from sivaramsk/master
Add -C as a short option to change base-directory
2025-10-14 00:38:48 -06:00
Sivaram Kannan c7a05504f4 Remove the trailing white space in -C short option. 2025-10-14 11:42:46 +05:30
Thayne McCombs 80d0fb2b70 feat[release]: Add attestation for release artifacts 2025-10-13 23:59:51 -06:00
Sivaram Kannan 3263141223 Add -C option to the manpage fd.1. 2025-10-14 08:14:46 +05:30
Sivaram Kannan 98a4233e14 Add base-directory entry along with short option -C in the README.md file. 2025-10-14 08:13:55 +05:30
Sivaram Kannan 4e6f46b191 Add short option -C to the option base-directory. 2025-10-14 08:12:04 +05:30
Thayne McCombs 8c9c6bec75 Merge pull request #1802 from sharkdp/dependabot/cargo/anyhow-1.0.100
build(deps): bump anyhow from 1.0.99 to 1.0.100
2025-10-03 01:21:39 -06:00
Thayne McCombs ee5332d0d3 fix: --print0 now works with --exec
If you use --print0 with --exec, it will now print a \0 between each set
of commands run. That is, between the output for the commands run for
each found item.

Fixes: #1797
2025-10-03 01:15:48 -06:00
Thayne McCombs 2ae1154be4 fix: Clippy warning from anyhow update 2025-10-02 23:08:37 -06:00
dependabot[bot] e89650f169 build(deps): bump anyhow from 1.0.99 to 1.0.100
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.99 to 1.0.100.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.99...1.0.100)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-version: 1.0.100
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-02 00:34:09 +00:00
Thayne McCombs ba2dde80f3 Merge pull request #1801 from sharkdp/dependabot/cargo/clap_complete-4.5.58
build(deps): bump clap_complete from 4.5.57 to 4.5.58
2025-10-01 18:29:52 -06:00
Thayne McCombs 7f3dd94092 Merge pull request #1804 from sharkdp/dependabot/cargo/clap-4.5.48
build(deps): bump clap from 4.5.46 to 4.5.48
2025-10-01 18:29:13 -06:00
Thayne McCombs 10d1ecf2a2 Merge pull request #1803 from sharkdp/dependabot/cargo/tempfile-3.23.0
build(deps): bump tempfile from 3.21.0 to 3.23.0
2025-10-01 18:05:41 -06:00
dependabot[bot] 3f77968f1d build(deps): bump clap from 4.5.46 to 4.5.48
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.46 to 4.5.48.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.46...clap_complete-v4.5.48)

---
updated-dependencies:
- dependency-name: clap
  dependency-version: 4.5.48
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-01 17:01:42 +00:00
dependabot[bot] 92bdd78e56 build(deps): bump tempfile from 3.21.0 to 3.23.0
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.21.0 to 3.23.0.
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.21.0...v3.23.0)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-version: 3.23.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-01 17:01:37 +00:00
dependabot[bot] 27d90dca17 build(deps): bump clap_complete from 4.5.57 to 4.5.58
Bumps [clap_complete](https://github.com/clap-rs/clap) from 4.5.57 to 4.5.58.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.57...clap_complete-v4.5.58)

---
updated-dependencies:
- dependency-name: clap_complete
  dependency-version: 4.5.58
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-01 17:01:27 +00:00
Thayne McCombs 47cedbb44e Merge pull request #1799 from ritoban23/fix-powershell-completion-collision
Fix PowerShell completion filename collision on Windows
2025-09-26 08:39:31 -06:00
ritoban23 a32e6a8d3e Fix PowerShell completion filename collision on Windows 2025-09-26 16:08:10 +05:30
David Peter b3e3977c2b Update Tuple logo 2025-09-23 19:39:33 +02:00
Thayne McCombs 8d254c5337 Merge pull request #1796 from sorairolake/remove-build-rs
build: Remove `build.rs`
2025-09-19 09:29:48 -06:00
Shun Sakai 5c4477c9d3 build: Remove build.rs
The `rust-version` field has been set and the MSRV is validated by
this. So the build script is no longer needed.
2025-09-19 19:31:55 +09:00
Thayne McCombs 4344a26540 Merge pull request #1782 from tmccombs/completion-docs
docs: Add some documentation on how to install completions
2025-09-05 19:22:08 -06:00
David Peter 37b67767a2 Update README 2025-09-04 09:03:17 +02:00
Thayne McCombs 1c316becf3 Merge pull request #1791 from sharkdp/dependabot/cargo/anyhow-1.0.99
build(deps): bump anyhow from 1.0.98 to 1.0.99
2025-09-03 11:46:45 -06:00
dependabot[bot] 1ccb6fd2f2 build(deps): bump anyhow from 1.0.98 to 1.0.99
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.98 to 1.0.99.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.98...1.0.99)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-version: 1.0.99
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-03 17:28:47 +00:00
Thayne McCombs e1cb0f44a3 Merge pull request #1792 from sharkdp/dependabot/cargo/libc-0.2.175
build(deps): bump libc from 0.2.174 to 0.2.175
2025-09-03 11:28:29 -06:00
Thayne McCombs 009d776db5 Merge pull request #1790 from sharkdp/dependabot/cargo/clap_complete-4.5.57
build(deps): bump clap_complete from 4.5.55 to 4.5.57
2025-09-03 11:27:48 -06:00
dependabot[bot] 32558eaf4e build(deps): bump libc from 0.2.174 to 0.2.175
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.174 to 0.2.175.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Changelog](https://github.com/rust-lang/libc/blob/0.2.175/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.174...0.2.175)

---
updated-dependencies:
- dependency-name: libc
  dependency-version: 0.2.175
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-03 10:20:00 +00:00
dependabot[bot] 5be8cc0167 build(deps): bump clap_complete from 4.5.55 to 4.5.57
Bumps [clap_complete](https://github.com/clap-rs/clap) from 4.5.55 to 4.5.57.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.55...clap_complete-v4.5.57)

---
updated-dependencies:
- dependency-name: clap_complete
  dependency-version: 4.5.57
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-03 06:34:29 +00:00
Thayne McCombs e6cf1875ed Merge pull request #1785 from sharkdp/dependabot/cargo/clap-4.5.46
build(deps): bump clap from 4.5.42 to 4.5.46
2025-09-02 09:41:11 -06:00
Thayne McCombs 377c442c4e Merge pull request #1786 from sharkdp/dependabot/cargo/regex-syntax-0.8.6
build(deps): bump regex-syntax from 0.8.5 to 0.8.6
2025-09-02 09:40:26 -06:00
Thayne McCombs 13d79ffd41 Merge pull request #1787 from sharkdp/dependabot/cargo/regex-1.11.2
build(deps): bump regex from 1.11.1 to 1.11.2
2025-09-02 09:40:03 -06:00
Thayne McCombs ddf144b596 Merge pull request #1788 from sharkdp/dependabot/cargo/tempfile-3.21.0
build(deps): bump tempfile from 3.20.0 to 3.21.0
2025-09-02 09:39:04 -06:00
dependabot[bot] fb3ffca4c7 build(deps): bump tempfile from 3.20.0 to 3.21.0
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.20.0 to 3.21.0.
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.20.0...v3.21.0)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-version: 3.21.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-02 10:38:14 +00:00
dependabot[bot] 725b296ce4 build(deps): bump regex from 1.11.1 to 1.11.2
Bumps [regex](https://github.com/rust-lang/regex) from 1.11.1 to 1.11.2.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.11.1...1.11.2)

---
updated-dependencies:
- dependency-name: regex
  dependency-version: 1.11.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-02 09:41:20 +00:00
dependabot[bot] a13e0b9926 build(deps): bump regex-syntax from 0.8.5 to 0.8.6
Bumps [regex-syntax](https://github.com/rust-lang/regex) from 0.8.5 to 0.8.6.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/regex-syntax-0.8.5...regex-syntax-0.8.6)

---
updated-dependencies:
- dependency-name: regex-syntax
  dependency-version: 0.8.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-02 09:35:34 +00:00
dependabot[bot] 9ed1ce98a9 build(deps): bump clap from 4.5.42 to 4.5.46
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.42 to 4.5.46.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.42...clap_complete-v4.5.46)

---
updated-dependencies:
- dependency-name: clap
  dependency-version: 4.5.46
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-02 08:06:54 +00:00
Thayne McCombs e13dd192f1 docs: Add some documentation on how to install completions
Fixes: #1769
2025-08-26 02:48:20 -06:00
Thayne McCombs 498ea1cc77 Merge pull request #1781 from sharkdp/changelog-update
chore: Add next entry to changelog
2025-08-26 02:29:39 -06:00
Thayne McCombs 0d3261daf7 chore: Add next entry to changelog 2025-08-26 02:29:10 -06:00
Thayne McCombs d38148f0aa Merge pull request #1780 from sharkdp/release-10.3
release: 10.3
2025-08-26 01:32:04 -06:00
Thayne McCombs 04832f1ac4 release: 10.3 2025-08-26 00:58:38 -06:00
Tavian Barnes fd06e69ed2 Merge pull request #1776 from tmccombs/os-update
OS update
2025-08-19 16:17:09 -04:00
Thayne McCombs 456afaef88 build: Update OSes for github actions
- Remove macos-13 because GitHub no longer supports it.
 - Update the version of Ubuntu used.
2025-08-19 01:52:07 -06:00
Tavian Barnes 377f8d6ef7 Merge pull request #1771 from sharkdp/dependabot/github_actions/actions/checkout-5
build(deps): bump actions/checkout from 4 to 5
2025-08-12 08:43:34 -04:00
dependabot[bot] d2d1a8580e build(deps): bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-12 06:25:09 +00:00
Thayne McCombs acb7f72254 Merge pull request #1772 from sharkdp/fix-clippy-lifetime-elision
filesystem: Fix a clippy warning about lifetime elision
2025-08-11 23:22:47 -07:00
Tavian Barnes 677823227c filesystem: Fix a clippy warning about lifetime elision 2025-08-11 21:02:01 -04:00
Thayne McCombs d856e78591 Merge pull request #1764 from sharkdp/dependabot/cargo/clap_complete-4.5.55
build(deps): bump clap_complete from 4.5.54 to 4.5.55
2025-08-01 10:37:08 -07:00
Thayne McCombs 0c71954017 Merge pull request #1762 from sharkdp/dependabot/cargo/clap-4.5.42
build(deps): bump clap from 4.5.40 to 4.5.42
2025-08-01 10:35:27 -07:00
dependabot[bot] f58e562809 build(deps): bump clap_complete from 4.5.54 to 4.5.55
Bumps [clap_complete](https://github.com/clap-rs/clap) from 4.5.54 to 4.5.55.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.54...clap_complete-v4.5.55)

---
updated-dependencies:
- dependency-name: clap_complete
  dependency-version: 4.5.55
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-01 17:21:59 +00:00
dependabot[bot] 221e5dc894 build(deps): bump clap from 4.5.40 to 4.5.42
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.40 to 4.5.42.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.40...clap_complete-v4.5.42)

---
updated-dependencies:
- dependency-name: clap
  dependency-version: 4.5.42
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-01 17:21:45 +00:00
Thayne McCombs 6dfbbe86fc Merge pull request #1736 from tmccombs/package-updates
chore: Update several packages
2025-07-10 00:08:17 -06:00
Thayne McCombs c8f4a6b546 Merge pull request #1750 from sharkdp/dependabot/cargo/libc-0.2.174
build(deps): bump libc from 0.2.172 to 0.2.174
2025-07-06 09:17:14 -06:00
dependabot[bot] d5894ba4f3 build(deps): bump libc from 0.2.172 to 0.2.174
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.172 to 0.2.174.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Changelog](https://github.com/rust-lang/libc/blob/0.2.174/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.172...0.2.174)

---
updated-dependencies:
- dependency-name: libc
  dependency-version: 0.2.174
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-06 06:38:00 +00:00
Thayne McCombs be94ec6136 Merge pull request #1755 from tmccombs/master
fix: Remove duplicate nix from lockfile

Fixes #1753
2025-07-06 00:36:15 -06:00
Thayne McCombs 6465ce6d65 chore: Update several packages 2025-07-06 00:21:13 -06:00
Thayne McCombs abb188ef37 fix: Remove duplicate nix from lockfile 2025-07-06 00:01:25 -06:00
Thayne McCombs f91d97e475 Merge pull request #1749 from sharkdp/dependabot/cargo/ctrlc-3.4.7
build(deps): bump ctrlc from 3.4.6 to 3.4.7
2025-07-01 13:25:46 -06:00
Thayne McCombs 377c2c05d8 Merge pull request #1747 from sharkdp/dependabot/cargo/clap_complete-4.5.54
build(deps): bump clap_complete from 4.5.52 to 4.5.54
2025-07-01 13:24:43 -06:00
Thayne McCombs a406b0c5de Merge pull request #1748 from sharkdp/dependabot/cargo/argmax-0.4.0
build(deps): bump argmax from 0.3.1 to 0.4.0
2025-07-01 13:24:02 -06:00
Thayne McCombs edb12d22a2 Merge pull request #1746 from sharkdp/dependabot/cargo/clap-4.5.40
build(deps): bump clap from 4.5.39 to 4.5.40
2025-07-01 13:23:39 -06:00
dependabot[bot] 275b56c168 build(deps): bump ctrlc from 3.4.6 to 3.4.7
Bumps [ctrlc](https://github.com/Detegr/rust-ctrlc) from 3.4.6 to 3.4.7.
- [Release notes](https://github.com/Detegr/rust-ctrlc/releases)
- [Commits](https://github.com/Detegr/rust-ctrlc/compare/3.4.6...3.4.7)

---
updated-dependencies:
- dependency-name: ctrlc
  dependency-version: 3.4.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-01 17:26:02 +00:00
dependabot[bot] b108817d31 build(deps): bump argmax from 0.3.1 to 0.4.0
Bumps [argmax](https://github.com/sharkdp/argmax) from 0.3.1 to 0.4.0.
- [Release notes](https://github.com/sharkdp/argmax/releases)
- [Commits](https://github.com/sharkdp/argmax/compare/v0.3.1...v0.4.0)

---
updated-dependencies:
- dependency-name: argmax
  dependency-version: 0.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-01 17:25:57 +00:00
dependabot[bot] 1cadc21b42 build(deps): bump clap_complete from 4.5.52 to 4.5.54
Bumps [clap_complete](https://github.com/clap-rs/clap) from 4.5.52 to 4.5.54.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.52...clap_complete-v4.5.54)

---
updated-dependencies:
- dependency-name: clap_complete
  dependency-version: 4.5.54
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-01 17:25:51 +00:00
dependabot[bot] db6aefa5b8 build(deps): bump clap from 4.5.39 to 4.5.40
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.39 to 4.5.40.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.39...clap_complete-v4.5.40)

---
updated-dependencies:
- dependency-name: clap
  dependency-version: 4.5.40
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-01 17:25:46 +00:00
Thayne McCombs b7fe2ce91b Merge pull request #1742 from nealsid/remove-illumos-jemalloc
Changes to support building/testing fd on Illumos
2025-06-23 15:03:33 -06:00
Neal S e76e7ffbd3 Remove test_invalid_cwd on illumos
rmdir on illumos does not support removing the current working
directory, so this test errors out with EINVAL when calling
std::fs::remove_dir.
2025-06-23 08:52:40 -04:00
Neal S 5c66878fb4 Make test be excluded at compile time rather than at run-time. 2025-06-23 08:52:40 -04:00
Neal S 1857ffff0c Use printf in a test rather than echo -n
echo -n is not POSIX compliant, and this came up while running tests
on Illumos.
2025-06-23 08:52:40 -04:00
Neal S 56ca42aed0 Do not use jemalloc on Illumos
Fix for #1741: jemalloc doesn't build on Illumos, so add it to the list of excluded
platforms.
2025-06-20 19:03:53 -04:00
Thayne McCombs ba35c5ea67 Merge pull request #1738 from tkb-github/patch-3
Update README.md to RHEL 10
2025-06-08 15:08:33 -06:00
tkb-github 3d704fb4b9 Update README.md to RHEL 10 2025-06-08 15:07:32 +08:00
Thayne McCombs fd5ec5fed5 Merge pull request #1732 from sharkdp/dependabot/cargo/tempfile-3.20.0
build(deps): bump tempfile from 3.19.1 to 3.20.0
2025-06-01 15:54:50 -06:00
Thayne McCombs b2c7cd1e3e Merge pull request #1733 from sharkdp/dependabot/cargo/clap-4.5.39
build(deps): bump clap from 4.5.37 to 4.5.39
2025-06-01 15:54:26 -06:00
Thayne McCombs 851fa4e5bb Merge pull request #1731 from sharkdp/dependabot/cargo/clap_complete-4.5.52
build(deps): bump clap_complete from 4.5.48 to 4.5.52
2025-06-01 15:54:05 -06:00
dependabot[bot] 9f2cf9205d build(deps): bump clap from 4.5.37 to 4.5.39
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.37 to 4.5.39.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.37...clap_complete-v4.5.39)

---
updated-dependencies:
- dependency-name: clap
  dependency-version: 4.5.39
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-01 21:14:17 +00:00
dependabot[bot] f9eaf7e4b9 build(deps): bump clap_complete from 4.5.48 to 4.5.52
Bumps [clap_complete](https://github.com/clap-rs/clap) from 4.5.48 to 4.5.52.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.48...clap_complete-v4.5.52)

---
updated-dependencies:
- dependency-name: clap_complete
  dependency-version: 4.5.52
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-01 21:14:12 +00:00
Thayne McCombs 0e73fe9aa5 Merge pull request #1735 from sharkdp/dependabot/cargo/jiff-0.2.14
build(deps): bump jiff from 0.2.10 to 0.2.14
2025-06-01 15:13:16 -06:00
dependabot[bot] 8bd92f0572 build(deps): bump jiff from 0.2.10 to 0.2.14
Bumps [jiff](https://github.com/BurntSushi/jiff) from 0.2.10 to 0.2.14.
- [Release notes](https://github.com/BurntSushi/jiff/releases)
- [Changelog](https://github.com/BurntSushi/jiff/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/jiff/compare/jiff-static-0.2.10...jiff-static-0.2.14)

---
updated-dependencies:
- dependency-name: jiff
  dependency-version: 0.2.14
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-01 17:10:42 +00:00
dependabot[bot] 16fb0cb9d3 build(deps): bump tempfile from 3.19.1 to 3.20.0
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.19.1 to 3.20.0.
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.19.1...v3.20.0)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-version: 3.20.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-01 17:10:26 +00:00
Thayne McCombs dbea8a68a8 Merge pull request #1716 from jcotton42/windows-aarch64
Add aarch64 Windows to CI.
2025-05-19 22:17:01 -06:00
Thayne McCombs 8b91260815 Merge pull request #1721 from janderssonse/fix/add-security-policy
docs(security): add initial security policy
2025-05-19 22:16:38 -06:00
Thayne McCombs 9bd1647f86 Merge pull request #1722 from musicinmybrain/tikv
Depend on jemallocator as tikv-jemallocator, and update it to 0.6
2025-05-14 20:09:54 -06:00
Benjamin A. Beasley c4250eca2a Update tikv-jemallocator to 0.6 2025-05-14 17:49:05 -04:00
Benjamin A. Beasley cb150c4fd4 Depend on jemallocator as tikv-jemallocator
Upstream writes: “The project is also published as jemallocator for
historical reasons. The two crates are the same except names. For new
projects, it's recommended to use tikv-xxx versions instead.”
2025-05-14 17:46:08 -04:00
Josef Andersson e389e5d275 docs(security): add initial security policy
Signed-off-by: Josef Andersson <janderssonse@proton.me>
2025-05-11 07:33:45 +02:00
Thayne McCombs efe499ac0d Merge pull request #1717 from tmccombs/doc-better
Doc better
2025-04-30 14:02:22 -06:00
Thayne McCombs 0ada245e37 Fix typo
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-30 12:03:32 -06:00
Thayne McCombs 402d4e7c12 docs: Clarify option positions in README 2025-04-30 01:26:43 -06:00
Thayne McCombs 26795f6a55 docs: Mention how to end --exec-batch args
Fixes: #1694
2025-04-30 01:24:56 -06:00
Thayne McCombs bc79395bcf docs: Better specify that if path is given, pattern must be as well.
See: #1376
2025-04-30 00:55:05 -06:00
Josh Cotton ad75d79a52 Add aarch64 Windows to CI. 2025-04-29 14:40:17 -07:00
Thayne McCombs 494eef044c Merge pull request #1715 from sharkdp/update-crossbeam
Update to crossbeam-channel 0.5.15
2025-04-29 09:18:16 -06:00
30 changed files with 1045 additions and 452 deletions
+9
View File
@@ -0,0 +1,9 @@
# On Windows MSVC, statically link the C runtime so that the resulting EXE does
# not depend on the vcruntime DLL.
#
# See: https://github.com/sharkdp/fd/issues/1874
[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]
[target.i686-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]
+4
View File
@@ -4,7 +4,11 @@ updates:
directory: "/" directory: "/"
schedule: schedule:
interval: "monthly" interval: "monthly"
cooldown:
default-days: 7
- package-ecosystem: "github-actions" - package-ecosystem: "github-actions"
directory: "/" directory: "/"
schedule: schedule:
interval: "daily" interval: "daily"
cooldown:
default-days: 7
+94 -47
View File
@@ -13,12 +13,17 @@ on:
tags: tags:
- '*' - '*'
permissions:
contents: read
jobs: jobs:
crate_metadata: crate_metadata:
name: Extract crate metadata name: Extract crate metadata
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
with:
persist-credentials: false
- name: Extract crate information - name: Extract crate information
id: crate_metadata id: crate_metadata
run: | run: |
@@ -41,7 +46,9 @@ jobs:
- uses: dtolnay/rust-toolchain@stable - uses: dtolnay/rust-toolchain@stable
with: with:
components: rustfmt components: rustfmt
- uses: actions/checkout@v4 - uses: actions/checkout@v6
with:
persist-credentials: false
- run: cargo fmt -- --check - run: cargo fmt -- --check
lint_check: lint_check:
@@ -51,7 +58,9 @@ jobs:
- uses: dtolnay/rust-toolchain@stable - uses: dtolnay/rust-toolchain@stable
with: with:
components: clippy components: clippy
- uses: actions/checkout@v4 - uses: actions/checkout@v6
with:
persist-credentials: false
- run: cargo clippy --all-targets --all-features -- -Dwarnings - run: cargo clippy --all-targets --all-features -- -Dwarnings
min_version: min_version:
@@ -60,7 +69,9 @@ jobs:
needs: crate_metadata needs: crate_metadata
steps: steps:
- name: Checkout source code - name: Checkout source code
uses: actions/checkout@v4 uses: actions/checkout@v6
with:
persist-credentials: false
- name: Install rust toolchain (v${{ needs.crate_metadata.outputs.msrv }}) - name: Install rust toolchain (v${{ needs.crate_metadata.outputs.msrv }})
uses: dtolnay/rust-toolchain@master uses: dtolnay/rust-toolchain@master
@@ -68,41 +79,49 @@ jobs:
toolchain: ${{ needs.crate_metadata.outputs.msrv }} toolchain: ${{ needs.crate_metadata.outputs.msrv }}
components: clippy components: clippy
- name: Run clippy (on minimum supported rust version to prevent warnings we can't fix) - name: Run clippy (on minimum supported rust version to prevent warnings we can't fix)
run: cargo clippy --locked --all-targets ${{ env.MSRV_FEATURES }} run: cargo clippy --locked --all-targets "${MSRV_FEATURES}"
- name: Run tests - name: Run tests
run: cargo test --locked ${{ env.MSRV_FEATURES }} run: cargo test --locked "${MSRV_FEATURES}"
build: build:
name: ${{ matrix.job.target }} (${{ matrix.job.os }}) name: '${{ matrix.job.target }} (${{ matrix.job.os }})'
runs-on: ${{ matrix.job.os }} runs-on: ${{ matrix.job.os }}
needs: crate_metadata needs: crate_metadata
permissions:
id-token: write
contents: write
attestations: write
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
job: job:
- { target: aarch64-unknown-linux-gnu , os: ubuntu-22.04, use-cross: true } - { target: aarch64-unknown-linux-gnu , os: ubuntu-24.04, use-cross: true }
- { target: aarch64-unknown-linux-musl , os: ubuntu-22.04, use-cross: true } - { target: aarch64-unknown-linux-musl , os: ubuntu-24.04, use-cross: true }
- { target: arm-unknown-linux-gnueabihf , os: ubuntu-22.04, use-cross: true } - { target: arm-unknown-linux-gnueabihf , os: ubuntu-24.04, use-cross: true }
- { target: arm-unknown-linux-musleabihf, os: ubuntu-22.04, use-cross: true } - { target: arm-unknown-linux-musleabihf, os: ubuntu-24.04, use-cross: true }
- { target: i686-pc-windows-msvc , os: windows-2022 } - { target: i686-pc-windows-msvc , os: windows-2022 }
- { target: i686-unknown-linux-gnu , os: ubuntu-22.04, use-cross: true } - { target: i686-unknown-linux-gnu , os: ubuntu-24.04, use-cross: true }
- { target: i686-unknown-linux-musl , os: ubuntu-22.04, use-cross: true } - { target: i686-unknown-linux-musl , os: ubuntu-24.04, use-cross: true }
- { target: x86_64-apple-darwin , os: macos-13 }
- { target: aarch64-apple-darwin , os: macos-14 } - { target: aarch64-apple-darwin , os: macos-14 }
- { target: x86_64-pc-windows-gnu , os: windows-2022 } - { target: x86_64-pc-windows-gnu , os: windows-2022 }
- { target: x86_64-pc-windows-msvc , os: windows-2022 } - { target: x86_64-pc-windows-msvc , os: windows-2022 }
- { target: x86_64-unknown-linux-gnu , os: ubuntu-22.04, use-cross: true } - { target: aarch64-pc-windows-msvc , os: windows-11-arm }
- { target: x86_64-unknown-linux-musl , os: ubuntu-22.04, use-cross: true } - { target: x86_64-unknown-linux-gnu , os: ubuntu-24.04, use-cross: true }
- { target: x86_64-unknown-linux-musl , os: ubuntu-24.04, use-cross: true }
env: env:
BUILD_CMD: cargo BUILD_CMD: "${{ matrix.job.use-cross && 'cross' || 'cargo' }}"
target: ${{ matrix.job.target }}
name: ${{ needs.crate_metadata.outputs.name }}
steps: steps:
- name: Checkout source code - name: Checkout source code
uses: actions/checkout@v4 uses: actions/checkout@v6
with:
persist-credentials: false
- name: Install prerequisites - name: Install prerequisites
shell: bash shell: bash
run: | run: |
case ${{ matrix.job.target }} in case ${target} in
arm-unknown-linux-*) sudo apt-get -y update ; sudo apt-get -y install gcc-arm-linux-gnueabihf ;; arm-unknown-linux-*) sudo apt-get -y update ; sudo apt-get -y install gcc-arm-linux-gnueabihf ;;
aarch64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt-get -y install gcc-aarch64-linux-gnu ;; aarch64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt-get -y install gcc-aarch64-linux-gnu ;;
esac esac
@@ -111,21 +130,22 @@ jobs:
uses: dtolnay/rust-toolchain@stable uses: dtolnay/rust-toolchain@stable
with: with:
targets: ${{ matrix.job.target }} targets: ${{ matrix.job.target }}
# On windows, for now build with 1.77.2, so that it works on windows 7. toolchain: "stable"
# When we update the MSRV again, we'll need to revisit this, and probably drop support for Win7
toolchain: "${{ contains(matrix.job.target, 'windows-') && '1.77.2' || 'stable' }}"
- name: Install cross - name: Install cross
if: matrix.job.use-cross if: matrix.job.use-cross
uses: taiki-e/install-action@v2 env:
with: cross_version: "v0.2.5"
tool: cross package_name: "cross-x86_64-unknown-linux-gnu.tar.gz"
GH_TOKEN: "${{ github.token }}"
- name: Overwrite build command env variable run: |
if: matrix.job.use-cross dir="$HOME/.local/bin/"
shell: bash mkdir -p "$dir"
run: echo "BUILD_CMD=cross" >> $GITHUB_ENV gh release download --repo cross-rs/cross \
--pattern "${package_name}" -O - "${cross_version}" \
| tar -C "$dir" -xz
echo "$dir" >> $GITHUB_PATH
echo "Installed cross $cross_version" >> $GITHUB_STEP_SUMMARY
- name: Show version information (Rust, cargo, GCC) - name: Show version information (Rust, cargo, GCC)
shell: bash shell: bash
run: | run: |
@@ -138,7 +158,7 @@ jobs:
- name: Build - name: Build
shell: bash shell: bash
run: $BUILD_CMD build --locked --release --target=${{ matrix.job.target }} run: $BUILD_CMD build --locked --release --target="${target}"
- name: Set binary name & path - name: Set binary name & path
id: bin id: bin
@@ -146,13 +166,13 @@ jobs:
run: | run: |
# Figure out suffix of binary # Figure out suffix of binary
EXE_suffix="" EXE_suffix=""
case ${{ matrix.job.target }} in case ${target} in
*-pc-windows-*) EXE_suffix=".exe" ;; *-pc-windows-*) EXE_suffix=".exe" ;;
esac; esac;
# Setup paths # Setup paths
BIN_NAME="${{ needs.crate_metadata.outputs.name }}${EXE_suffix}" BIN_NAME="${name}${EXE_suffix}"
BIN_PATH="target/${{ matrix.job.target }}/release/${BIN_NAME}" BIN_PATH="target/${target}/release/${BIN_NAME}"
# Let subsequent steps know where to find the binary # Let subsequent steps know where to find the binary
echo "BIN_PATH=${BIN_PATH}" >> $GITHUB_OUTPUT echo "BIN_PATH=${BIN_PATH}" >> $GITHUB_OUTPUT
@@ -164,12 +184,17 @@ jobs:
run: | run: |
# test only library unit tests and binary for arm-type targets # test only library unit tests and binary for arm-type targets
unset CARGO_TEST_OPTIONS unset CARGO_TEST_OPTIONS
unset CARGO_TEST_OPTIONS ; case ${{ matrix.job.target }} in arm-* | aarch64-*) CARGO_TEST_OPTIONS="--bin ${{ needs.crate_metadata.outputs.name }}" ;; esac; case ${target} in
arm-* | aarch64-*)
CARGO_TEST_OPTIONS="--bin=${name}" ;;
esac
echo "CARGO_TEST_OPTIONS=${CARGO_TEST_OPTIONS}" >> $GITHUB_OUTPUT echo "CARGO_TEST_OPTIONS=${CARGO_TEST_OPTIONS}" >> $GITHUB_OUTPUT
- name: Run tests - name: Run tests
shell: bash shell: bash
run: $BUILD_CMD test --locked --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}} env:
cargo_test_options: ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}}
run: $BUILD_CMD test --locked --target="${target}" "${cargo_test_options}"
- name: Generate completions - name: Generate completions
id: completions id: completions
@@ -179,31 +204,37 @@ jobs:
- name: Create tarball - name: Create tarball
id: package id: package
shell: bash shell: bash
env:
BIN_PATH: ${{ steps.bin.outputs.BIN_PATH }}
version: ${{ needs.crate_metadata.outputs.version }}
run: | run: |
PKG_suffix=".tar.gz" ; case ${{ matrix.job.target }} in *-pc-windows-*) PKG_suffix=".zip" ;; esac; PKG_suffix=".tar.gz"
PKG_BASENAME=${{ needs.crate_metadata.outputs.name }}-v${{ needs.crate_metadata.outputs.version }}-${{ matrix.job.target }} case ${target} in
*-pc-windows-*) PKG_suffix=".zip" ;;
esac
PKG_BASENAME=${name}-v${version}-${target}
PKG_NAME=${PKG_BASENAME}${PKG_suffix} PKG_NAME=${PKG_BASENAME}${PKG_suffix}
echo "PKG_NAME=${PKG_NAME}" >> $GITHUB_OUTPUT echo "PKG_NAME=${PKG_NAME}" >> $GITHUB_OUTPUT
PKG_STAGING="${{ env.CICD_INTERMEDIATES_DIR }}/package" PKG_STAGING="${CICD_INTERMEDIATES_DIR}/package"
ARCHIVE_DIR="${PKG_STAGING}/${PKG_BASENAME}/" ARCHIVE_DIR="${PKG_STAGING}/${PKG_BASENAME}/"
mkdir -p "${ARCHIVE_DIR}" mkdir -p "${ARCHIVE_DIR}"
# Binary # Binary
cp "${{ steps.bin.outputs.BIN_PATH }}" "$ARCHIVE_DIR" cp "${BIN_PATH}" "$ARCHIVE_DIR"
# README, LICENSE and CHANGELOG files # README, LICENSE and CHANGELOG files
cp "README.md" "LICENSE-MIT" "LICENSE-APACHE" "CHANGELOG.md" "$ARCHIVE_DIR" cp "README.md" "LICENSE-MIT" "LICENSE-APACHE" "CHANGELOG.md" "$ARCHIVE_DIR"
# Man page # Man page
cp 'doc/${{ needs.crate_metadata.outputs.name }}.1' "$ARCHIVE_DIR" cp "doc/${name}.1" "$ARCHIVE_DIR"
# Autocompletion files # Autocompletion files
cp -r autocomplete "${ARCHIVE_DIR}" cp -r autocomplete "${ARCHIVE_DIR}"
# base compressed package # base compressed package
pushd "${PKG_STAGING}/" >/dev/null pushd "${PKG_STAGING}/" >/dev/null
case ${{ matrix.job.target }} in case ${target} in
*-pc-windows-*) 7z -y a "${PKG_NAME}" "${PKG_BASENAME}"/* | tail -2 ;; *-pc-windows-*) 7z -y a "${PKG_NAME}" "${PKG_BASENAME}"/* | tail -2 ;;
*) tar czf "${PKG_NAME}" "${PKG_BASENAME}"/* ;; *) tar czf "${PKG_NAME}" "${PKG_BASENAME}"/* ;;
esac; esac;
@@ -223,13 +254,15 @@ jobs:
BIN_PATH: ${{ steps.bin.outputs.BIN_PATH }} BIN_PATH: ${{ steps.bin.outputs.BIN_PATH }}
- name: "Artifact upload: tarball" - name: "Artifact upload: tarball"
uses: actions/upload-artifact@master id: upload-tarball
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
with: with:
name: ${{ steps.package.outputs.PKG_NAME }} name: ${{ steps.package.outputs.PKG_NAME }}
path: ${{ steps.package.outputs.PKG_PATH }} path: ${{ steps.package.outputs.PKG_PATH }}
- name: "Artifact upload: Debian package" - name: "Artifact upload: Debian package"
uses: actions/upload-artifact@master id: upload-deb
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
if: steps.debian-package.outputs.DPKG_NAME if: steps.debian-package.outputs.DPKG_NAME
with: with:
name: ${{ steps.debian-package.outputs.DPKG_NAME }} name: ${{ steps.debian-package.outputs.DPKG_NAME }}
@@ -242,8 +275,22 @@ jobs:
unset IS_RELEASE ; if [[ $GITHUB_REF =~ ^refs/tags/v[0-9].* ]]; then IS_RELEASE='true' ; fi unset IS_RELEASE ; if [[ $GITHUB_REF =~ ^refs/tags/v[0-9].* ]]; then IS_RELEASE='true' ; fi
echo "IS_RELEASE=${IS_RELEASE}" >> $GITHUB_OUTPUT echo "IS_RELEASE=${IS_RELEASE}" >> $GITHUB_OUTPUT
- name: "Attest artifact: tarball"
uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4
if: steps.is-release.outputs.IS_RELEASE
with:
subject-name: ${{ steps.package.outputs.PKG_NAME }}
subject-digest: sha256:${{ steps.upload-tarball.outputs.artifact-digest }}
- name: "Attest artifact: Debian package"
uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4
if: 'steps.is-release.outputs.IS_RELEASE && steps.debian-package.outputs.DPKG_NAME'
with:
subject-name: ${{ steps.debian-package.outputs.DPKG_NAME }}
subject-digest: sha256:${{ steps.upload-deb.outputs.artifact-digest }}
- name: Publish archives and packages - name: Publish archives and packages
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
if: steps.is-release.outputs.IS_RELEASE if: steps.is-release.outputs.IS_RELEASE
with: with:
files: | files: |
@@ -258,7 +305,7 @@ jobs:
needs: build needs: build
if: startsWith(github.ref, 'refs/tags/v') if: startsWith(github.ref, 'refs/tags/v')
steps: steps:
- uses: vedantmgoyal2009/winget-releaser@v2 - uses: vedantmgoyal9/winget-releaser@4ffc7888bffd451b357355dc214d43bb9f23917e # v2
with: with:
identifier: sharkdp.fd identifier: sharkdp.fd
installers-regex: '-pc-windows-msvc\.zip$' installers-regex: '-pc-windows-msvc\.zip$'
+41 -1
View File
@@ -1,4 +1,35 @@
# Upcoming release # 10.4.2
## Bugfixes
- Fixed performance regression due to `--ignore-contain`; see #1913 and #1914
# 10.4.1
This is just a re-release of 10.4.0 due to an issue with the 10.4.0 release.
# 10.4.0
## Features
- Add `--ignore-contain` option to ignore directories containing a named entry (e.g. to ignore [`CACHEDIR.TAG`](https://bford.info/cachedir/)); see #1727 (@fischman).
## Bugfixes
- Fix Windows hyperlink generation for paths with spaces. (#1872)
- `--print0` combined with `--exec` will now print a `\0` between the output of each entry. Note that if there are multiple instances
of `--exec`, the `\0` will be between each _set_ of commands, _not_ between each individual command run. Fixes #1797.
- Several bugs were fixed by an update to the `ignore` library used for handling ignore rules
- #1506
- #1667
- #1813
## Changes
- Minimum required rust version has been increased to 1.90.0. Notably, this means dropping fully support for intel Mac and Windows 7.
- Statically link the CRT for MSVC builds via Cargo config to avoid runtime DLL dependencies, see #1874 (@FidelSch)
# 10.3.0
## Features ## Features
@@ -15,9 +46,18 @@
- 'M' no longer means "month", as that could be confusing with minutes. Use "mo", "mos", "month" or "months" instead. - 'M' no longer means "month", as that could be confusing with minutes. Use "mo", "mos", "month" or "months" instead.
- month and year now account for variability in the calander rather than being a hard-coded number of seconds. That is probably - month and year now account for variability in the calander rather than being a hard-coded number of seconds. That is probably
what you would expect, but it is a slight change in behavior. what you would expect, but it is a slight change in behavior.
- aarch64 Windows was added to CI and release artifacts
- Many dependencies were updated
- Better support building on Illumos (there is no automated testing, but some known issues were fixed)
## Other ## Other
This will be the last release that has been tested on x86_64 Mac OS, since GitHub is
dropping support for runners with that hardware.
It may also be the last release to use a version of Rust with tier-1 support for
x86_64/intel Macs and Windows 7.
# 10.2.0 # 10.2.0
Generated
+483 -212
View File
File diff suppressed because it is too large Load Diff
+46 -21
View File
@@ -1,6 +1,5 @@
[package] [package]
authors = ["David Peter <mail@david-peter.de>"] authors = ["David Peter <mail@david-peter.de>"]
build = "build.rs"
categories = ["command-line-utilities"] categories = ["command-line-utilities"]
description = "fd is a simple, fast and user-friendly alternative to find." description = "fd is a simple, fast and user-friendly alternative to find."
exclude = ["/benchmarks/*"] exclude = ["/benchmarks/*"]
@@ -17,9 +16,9 @@ license = "MIT OR Apache-2.0"
name = "fd-find" name = "fd-find"
readme = "README.md" readme = "README.md"
repository = "https://github.com/sharkdp/fd" repository = "https://github.com/sharkdp/fd"
version = "10.2.0" version = "10.4.2"
edition= "2021" edition= "2024"
rust-version = "1.77.2" rust-version = "1.90.0"
[badges.appveyor] [badges.appveyor]
repository = "sharkdp/fd" repository = "sharkdp/fd"
@@ -31,37 +30,34 @@ repository = "sharkdp/fd"
name = "fd" name = "fd"
path = "src/main.rs" path = "src/main.rs"
[build-dependencies]
version_check = "0.9"
[dependencies] [dependencies]
aho-corasick = "1.1" aho-corasick = "1.1"
nu-ansi-term = "0.50" nu-ansi-term = "0.50"
argmax = "0.3.1" argmax = "0.4.0"
ignore = "0.4.23" ignore = "0.4.25"
regex = "1.11.1" regex = "1.12.2"
regex-syntax = "0.8" regex-syntax = "0.8"
ctrlc = "3.2" ctrlc = "3.5"
globset = "0.4" globset = "0.4"
anyhow = "1.0" anyhow = "1.0"
etcetera = "0.10" etcetera = "0.11"
normpath = "1.1.1" normpath = "1.1.1"
crossbeam-channel = "0.5.15" crossbeam-channel = "0.5.15"
clap_complete = {version = "4.5.47", optional = true} clap_complete = {version = "4.5.62", optional = true}
faccess = "0.2.4" faccess = "0.2.4"
jiff = "0.2.5" jiff = "0.2.18"
[dependencies.clap] [dependencies.clap]
version = "4.5.35" version = "4.5.54"
features = ["suggestions", "color", "wrap_help", "cargo", "derive"] features = ["suggestions", "color", "wrap_help", "cargo", "derive"]
[dependencies.lscolors] [dependencies.lscolors]
version = "0.20" version = "0.21"
default-features = false default-features = false
features = ["nu-ansi-term"] features = ["nu-ansi-term"]
[target.'cfg(unix)'.dependencies] [target.'cfg(unix)'.dependencies]
nix = { version = "0.29.0", default-features = false, features = ["signal", "user", "hostname"] } nix = { version = "0.31.1", default-features = false, features = ["signal", "user", "hostname"] }
[target.'cfg(all(unix, not(target_os = "redox")))'.dependencies] [target.'cfg(all(unix, not(target_os = "redox")))'.dependencies]
libc = "0.2" libc = "0.2"
@@ -69,22 +65,51 @@ libc = "0.2"
# FIXME: Re-enable jemalloc on macOS # FIXME: Re-enable jemalloc on macOS
# jemalloc is currently disabled on macOS due to a bug in jemalloc in combination with macOS # jemalloc is currently disabled on macOS due to a bug in jemalloc in combination with macOS
# Catalina. See https://github.com/sharkdp/fd/issues/498 for details. # Catalina. See https://github.com/sharkdp/fd/issues/498 for details.
[target.'cfg(all(not(windows), not(target_os = "android"), not(target_os = "macos"), not(target_os = "freebsd"), not(target_os = "openbsd"), not(all(target_env = "musl", target_pointer_width = "32")), not(target_arch = "riscv64")))'.dependencies] # This has to be kept in sync with src/main.rs where the allocator for
jemallocator = {version = "0.5.4", optional = true} # the program is set.
[target.'cfg(all(not(windows), not(target_os = "android"), not(target_os = "macos"), not(target_os = "freebsd"), not(target_os = "openbsd"), not(target_os = "illumos"), not(all(target_env = "musl", target_pointer_width = "32")), not(target_arch = "riscv64")))'.dependencies]
tikv-jemallocator = {version = "0.6.0", optional = true}
[dev-dependencies] [dev-dependencies]
diff = "0.1" diff = "0.1"
tempfile = "3.19" tempfile = "3.24"
filetime = "0.2" filetime = "0.2"
test-case = "3.3" test-case = "3.3"
[profile.dev]
debug = "line-tables-only"
[profile.dev.package."*"]
debug = false
[profile.debugging]
inherits = "dev"
debug = true
[profile.release] [profile.release]
lto = true lto = true
strip = true strip = true
codegen-units = 1 codegen-units = 1
[features] [features]
use-jemalloc = ["jemallocator"] use-jemalloc = ["tikv-jemallocator"]
completions = ["clap_complete"] completions = ["clap_complete"]
base = ["use-jemalloc"] base = ["use-jemalloc"]
default = ["use-jemalloc", "completions"] default = ["use-jemalloc", "completions"]
[package.metadata.binstall]
pkg-url = "{ repo }/releases/download/v{ version }/{ name }-v{ version }-{ target }.{ archive-format }"
bin-dir = "{ bin }-v{ version }-{ target }/{ bin }{ binary-ext }"
pkg-fmt = "tgz"
[package.metadata.binstall.overrides.x86_64-pc-windows-msvc]
pkg-fmt = "zip"
[package.metadata.binstall.overrides.x86_64-pc-windows-gnu]
pkg-fmt = "zip"
[package.metadata.binstall.overrides.i686-pc-windows-msvc]
pkg-fmt = "zip"
[package.metadata.binstall.overrides.aarch64-pc-windows-msvc]
pkg-fmt = "zip"
+2 -2
View File
@@ -9,7 +9,7 @@ $(EXE): Cargo.toml src/**/*.rs
cargo build --profile $(PROFILE) --locked cargo build --profile $(PROFILE) --locked
.PHONY: completions .PHONY: completions
completions: autocomplete/fd.bash autocomplete/fd.fish autocomplete/fd.ps1 autocomplete/_fd completions: autocomplete/fd.bash autocomplete/fd.fish autocomplete/_fd.ps1 autocomplete/_fd
comp_dir=@mkdir -p autocomplete comp_dir=@mkdir -p autocomplete
@@ -21,7 +21,7 @@ autocomplete/fd.fish: $(EXE)
$(comp_dir) $(comp_dir)
$(EXE) --gen-completions fish > $@ $(EXE) --gen-completions fish > $@
autocomplete/fd.ps1: $(EXE) autocomplete/_fd.ps1: $(EXE)
$(comp_dir) $(comp_dir)
$(EXE) --gen-completions powershell > $@ $(EXE) --gen-completions powershell > $@
+56 -2
View File
@@ -27,6 +27,19 @@ While it does not aim to support all of `find`'s powerful functionality, it prov
* The command name is *50%* shorter[\*](https://github.com/ggreer/the_silver_searcher) than * The command name is *50%* shorter[\*](https://github.com/ggreer/the_silver_searcher) than
`find` :-). `find` :-).
## Sponsors
A special *thank you* goes to our biggest <a href="doc/sponsors.md">sponsor</a>:<br>
<a href="https://tuple.app/fd">
<img src="doc/sponsors/tuple-logo.png" width="200" alt="Tuple">
<br>
<strong>Tuple, the premier screen sharing app for developers</strong>
<br>
<sub>Available for MacOS &amp; Windows</sub>
</a>
## Demo ## Demo
![Demo](doc/screencast.svg) ![Demo](doc/screencast.svg)
@@ -298,7 +311,7 @@ This is the output of `fd -h`. To see the full set of command-line options, use
also includes a much more detailed help text. also includes a much more detailed help text.
``` ```
Usage: fd [OPTIONS] [pattern] [path]... Usage: fd [OPTIONS] [pattern [path]...]
Arguments: Arguments:
[pattern] the search pattern (a regular expression, unless '--glob' is used; optional) [pattern] the search pattern (a regular expression, unless '--glob' is used; optional)
@@ -331,10 +344,13 @@ Options:
always, never] always, never]
--hyperlink[=<when>] Add hyperlinks to output paths [default: never] [possible --hyperlink[=<when>] Add hyperlinks to output paths [default: never] [possible
values: auto, always, never] values: auto, always, never]
--ignore-contain <name> Ignore directories containing the named entry
-h, --help Print help (see more with '--help') -h, --help Print help (see more with '--help')
-V, --version Print version -V, --version Print version
``` ```
Note that options can be given after the pattern and/or path as well.
## Benchmark ## Benchmark
Let's search my home folder for files that end in `[0-9].jpg`. It contains ~750.000 Let's search my home folder for files that end in `[0-9].jpg`. It contains ~750.000
@@ -615,7 +631,7 @@ You can install [the fd package](https://github.com/getsolus/packages/tree/main/
eopkg install fd eopkg install fd
``` ```
### On RedHat Enterprise Linux 8/9 (RHEL8/9), Almalinux 8/9, EuroLinux 8/9 or Rocky Linux 8/9 ### On RedHat Enterprise Linux (RHEL) 8/9/10, Almalinux 8/9/10, EuroLinux 8/9 or Rocky Linux 8/9/10
You can install [the `fd` package](https://copr.fedorainfracloud.org/coprs/tkbcopr/fd/) from Fedora Copr. You can install [the `fd` package](https://copr.fedorainfracloud.org/coprs/tkbcopr/fd/) from Fedora Copr.
@@ -664,6 +680,13 @@ You can install [the fd package](https://guix.gnu.org/en/packages/fd-8.1.1/) fro
guix install fd guix install fd
``` ```
### On Mise
You can use [mise](https://github.com/jdx/mise) to install `fd` with a command like this:
```
mise use -g fd@latest
```
### On NixOS / via Nix ### On NixOS / via Nix
You can use the [Nix package manager](https://nixos.org/nix/) to install `fd`: You can use the [Nix package manager](https://nixos.org/nix/) to install `fd`:
@@ -722,6 +745,37 @@ cargo test
cargo install --path . cargo install --path .
``` ```
### Completions
#### From Release Archives
Pre-built completion files are included in the release archives (`.tar.gz`/`.zip`) on the
[Releases page](https://github.com/sharkdp/fd/releases), in the `autocomplete` directory.
To use these completions:
- **bash**: Source the `fd.bash` file in your `~/.bashrc`, or place it in a directory that gets sourced automatically.
- **zsh**: Move `_fd` to a directory in your `fpath` (e.g., `~/.zfunc`).
- **fish**: Copy `fd.fish` to `~/.config/fish/completions/`.
- **powershell**: Source `_fd.ps1` from one of your [profile scripts](https://learn.microsoft.com/en-us/powershell/scripting/learn/shell/creating-profiles?view=powershell-7.5).
#### Generate from fd
You can also generate completions directly using `fd --gen-completions <shell>`:
```bash
# Bash
fd --gen-completions bash > ~/.local/share/bash-completion/completions/fd
# Zsh (ensure ~/.zfunc is in your fpath)
fd --gen-completions zsh > ~/.zfunc/_fd
# Fish
fd --gen-completions fish > ~/.config/fish/completions/fd.fish
# PowerShell
fd --gen-completions powershell >> $PROFILE
```
## Maintainers ## Maintainers
- [sharkdp](https://github.com/sharkdp) - [sharkdp](https://github.com/sharkdp)
+33
View File
@@ -0,0 +1,33 @@
# Security Reporting
If you wish to report a security vulnerability privately, we appreciate your diligence. Please follow the guidelines below to submit your report.
## Reporting
To report a security vulnerability, please provide the following information:
1. **PROJECT**
- Include the URL of the project repository - Example: <https://github.com/sharkdp/fd>
2. **PUBLIC**
- Indicate whether this vulnerability has already been publicly discussed or disclosed.
- If so, provide relevant links.
3. **DESCRIPTION**
- Provide a detailed description of the security vulnerability.
- Include as much information as possible to help us understand and address the issue.
Send this information, along with any additional relevant details, to our [vulnerability reporting form](https://github.com/sharkdp/fd/security/advisories/new).
## Confidentiality
We kindly ask you to keep the report confidential until a public announcement is made.
## Notes
- Vulnerabilities will be handled on a best-effort basis.
- You may request an advance copy of the patched release, but we cannot guarantee early access before the public release.
- You will be notified via email simultaneously with the public announcement.
- We will respond within a few weeks to confirm whether your report has been accepted or rejected.
Thank you for helping to improve the security of our project!
-12
View File
@@ -1,12 +0,0 @@
fn main() {
let min_version = "1.64";
match version_check::is_min_version(min_version) {
Some(true) => {}
// rustc version too small or can't figure it out
_ => {
eprintln!("'fd' requires rustc >= {min_version}");
std::process::exit(1);
}
}
}
Vendored
+24 -3
View File
@@ -18,8 +18,8 @@ fd \- find entries in the filesystem
.IR num ] .IR num ]
.RB [ \-x .RB [ \-x
.IR cmd ] .IR cmd ]
.RI [ pattern ] .RI [ pattern
.RI [ path... ] .RI [ path... ]]
.SH DESCRIPTION .SH DESCRIPTION
.B fd .B fd
is a simple, fast and user-friendly alternative to is a simple, fast and user-friendly alternative to
@@ -34,6 +34,12 @@ By default
.B fd .B fd
will exclude hidden files and directories, as well as any files that match gitignore rules will exclude hidden files and directories, as well as any files that match gitignore rules
or ignore rules in .ignore or .fdignore files. or ignore rules in .ignore or .fdignore files.
.P
If you wish to search all files in a specific directory, you can use '' or . as the search pattern,
to match all files. Or you can use the '\-\-search\-path' option to specify the path(s) instead of
the positional parameter.
.P
Options may be given anywhere on the command line.
.SH OPTIONS .SH OPTIONS
.TP .TP
.B \-H, \-\-hidden .B \-H, \-\-hidden
@@ -259,6 +265,10 @@ Examples:
\-\-exclude '*.pyc' \-\-exclude '*.pyc'
\-\-exclude node_modules \-\-exclude node_modules
.TP .TP
.BI "\-\-ignore-contain " name
Exclude directories that (directly) contain the given name.
This option can be specified multiple times.
.TP
.BI "\-\-ignore-file " path .BI "\-\-ignore-file " path
Add a custom ignore-file in '.gitignore' format. Add a custom ignore-file in '.gitignore' format.
These files have a low precedence. These files have a low precedence.
@@ -379,7 +389,7 @@ Examples:
\-\-owner :students \-\-owner :students
\-\-owner "!john:students" \-\-owner "!john:students"
.TP .TP
.BI "\-\-base\-directory " path .BI "-C, \-\-base\-directory " path
Change the current working directory of fd to the provided path. This means that search results will Change the current working directory of fd to the provided path. This means that search results will
be shown with respect to the given base path. Note that relative paths which are passed to fd via the be shown with respect to the given base path. Note that relative paths which are passed to fd via the
positional \fIpath\fR argument or the \fB\-\-search\-path\fR option will also be resolved relative to positional \fIpath\fR argument or the \fB\-\-search\-path\fR option will also be resolved relative to
@@ -443,6 +453,9 @@ option.
If no placeholder is present, an implicit "{}" at the end is assumed. If no placeholder is present, an implicit "{}" at the end is assumed.
If --print0 is also given, then a null character (\\0) will be printed between the output for each found entry.
This allows another program to easily distinguish the output for each file if the command(s) produce multiple lines.
Examples: Examples:
- find all *.zip files and unzip them: - find all *.zip files and unzip them:
@@ -456,6 +469,10 @@ Examples:
- Convert all *.jpg files to *.png files: - Convert all *.jpg files to *.png files:
fd -e jpg -x convert {} {.}.png fd -e jpg -x convert {} {.}.png
- Run stat for each *.txt file, separated by null characters
fd -0 -e txt -x stat
.RE .RE
.TP .TP
.BI "\-X, \-\-exec-batch " command .BI "\-X, \-\-exec-batch " command
@@ -472,6 +489,10 @@ file in a batch and passed as separate arguments.
If no placeholder is present, an implicit "{}" at the end is assumed. If no placeholder is present, an implicit "{}" at the end is assumed.
Like \-\-exec, subsequent arguments are assumed to be part of
.I command
until either the end of command arguments or a ';' argument. See above.
Like \-\-exec, this can be used multiple times, in which case each command will be run in Like \-\-exec, this can be used multiple times, in which case each command will be run in
the order given. the order given.
File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 7.2 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

+7 -2
View File
@@ -4,8 +4,8 @@ use std::time::Duration;
use anyhow::anyhow; use anyhow::anyhow;
use clap::{ use clap::{
error::ErrorKind, value_parser, Arg, ArgAction, ArgGroup, ArgMatches, Command, Parser, Arg, ArgAction, ArgGroup, ArgMatches, Command, Parser, ValueEnum, error::ErrorKind,
ValueEnum, value_parser,
}; };
#[cfg(feature = "completions")] #[cfg(feature = "completions")]
use clap_complete::Shell; use clap_complete::Shell;
@@ -528,6 +528,10 @@ pub struct Opts {
)] )]
pub hyperlink: HyperlinkWhen, pub hyperlink: HyperlinkWhen,
/// Ignore directories containing the named entry.
#[arg(long, value_name = "name")]
pub ignore_contain: Vec<String>,
/// Set number of threads to use for searching & executing (default: number /// Set number of threads to use for searching & executing (default: number
/// of available CPU cores) /// of available CPU cores)
#[arg(long, short = 'j', value_name = "num", hide_short_help = true, value_parser = str::parse::<NonZeroUsize>)] #[arg(long, short = 'j', value_name = "num", hide_short_help = true, value_parser = str::parse::<NonZeroUsize>)]
@@ -594,6 +598,7 @@ pub struct Opts {
/// relative to this directory. /// relative to this directory.
#[arg( #[arg(
long, long,
short = 'C',
value_name = "path", value_name = "path",
hide_short_help = true, hide_short_help = true,
help = "Change current working directory", help = "Change current working directory",
+3
View File
@@ -130,6 +130,9 @@ pub struct Config {
/// Whether or not to use hyperlinks on paths /// Whether or not to use hyperlinks on paths
pub hyperlink: bool, pub hyperlink: bool,
/// Names that should stop traversal down their parent. (e.g. https://bford.info/cachedir/).
pub ignore_contain: Vec<String>,
} }
impl Config { impl Config {
+18 -13
View File
@@ -1,6 +1,5 @@
use std::io; use std::io;
use std::io::Write; use std::io::Write;
use std::sync::Mutex;
use argmax::Command; use argmax::Command;
@@ -11,15 +10,15 @@ struct Outputs {
stdout: Vec<u8>, stdout: Vec<u8>,
stderr: Vec<u8>, stderr: Vec<u8>,
} }
struct OutputBuffer<'a> { pub struct OutputBuffer {
output_permission: &'a Mutex<()>, null_separator: bool,
outputs: Vec<Outputs>, outputs: Vec<Outputs>,
} }
impl<'a> OutputBuffer<'a> { impl OutputBuffer {
fn new(output_permission: &'a Mutex<()>) -> Self { pub fn new(null_separator: bool) -> Self {
Self { Self {
output_permission, null_separator,
outputs: Vec::new(), outputs: Vec::new(),
} }
} }
@@ -29,17 +28,19 @@ impl<'a> OutputBuffer<'a> {
} }
fn write(self) { fn write(self) {
// avoid taking the lock if there is nothing to do // Avoid taking the lock if there is nothing to do.
if self.outputs.is_empty() { // If null_separator is true, then we still need to write the
// null separator, because the output may have been written directly
// to stdout
if self.outputs.is_empty() && !self.null_separator {
return; return;
} }
// While this lock is active, this thread will be the only thread allowed
// to write its outputs.
let _lock = self.output_permission.lock().unwrap();
let stdout = io::stdout(); let stdout = io::stdout();
let stderr = io::stderr(); let stderr = io::stderr();
// While we hold these locks, only this thread will be able
// to write its outputs.
let mut stdout = stdout.lock(); let mut stdout = stdout.lock();
let mut stderr = stderr.lock(); let mut stderr = stderr.lock();
@@ -47,16 +48,20 @@ impl<'a> OutputBuffer<'a> {
let _ = stdout.write_all(&output.stdout); let _ = stdout.write_all(&output.stdout);
let _ = stderr.write_all(&output.stderr); let _ = stderr.write_all(&output.stderr);
} }
if self.null_separator {
// If null_separator is enabled, then we should write a \0 at the end
// of the output for this entry
let _ = stdout.write_all(b"\0");
}
} }
} }
/// Executes a command. /// Executes a command.
pub fn execute_commands<I: Iterator<Item = io::Result<Command>>>( pub fn execute_commands<I: Iterator<Item = io::Result<Command>>>(
cmds: I, cmds: I,
out_perm: &Mutex<()>, mut output_buffer: OutputBuffer,
enable_output_buffering: bool, enable_output_buffering: bool,
) -> ExitCode { ) -> ExitCode {
let mut output_buffer = OutputBuffer::new(out_perm);
for result in cmds { for result in cmds {
let mut cmd = match result { let mut cmd = match result {
Ok(cmd) => cmd, Ok(cmd) => cmd,
+2 -5
View File
@@ -1,8 +1,6 @@
use std::sync::Mutex;
use crate::config::Config; use crate::config::Config;
use crate::error::print_error; use crate::error::print_error;
use crate::exit_codes::{merge_exitcodes, ExitCode}; use crate::exit_codes::{ExitCode, merge_exitcodes};
use crate::walk::WorkerResult; use crate::walk::WorkerResult;
use super::CommandSet; use super::CommandSet;
@@ -13,7 +11,6 @@ use super::CommandSet;
pub fn job( pub fn job(
results: impl IntoIterator<Item = WorkerResult>, results: impl IntoIterator<Item = WorkerResult>,
cmd: &CommandSet, cmd: &CommandSet,
out_perm: &Mutex<()>,
config: &Config, config: &Config,
) -> ExitCode { ) -> ExitCode {
// Output should be buffered when only running a single thread // Output should be buffered when only running a single thread
@@ -37,7 +34,7 @@ pub fn job(
let code = cmd.execute( let code = cmd.execute(
dir_entry.stripped_path(config), dir_entry.stripped_path(config),
config.path_separator.as_deref(), config.path_separator.as_deref(),
out_perm, config.null_separator,
buffer_output, buffer_output,
); );
ret = merge_exitcodes([ret, code]); ret = merge_exitcodes([ret, code]);
+5 -5
View File
@@ -6,12 +6,12 @@ use std::io;
use std::iter; use std::iter;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use std::process::Stdio; use std::process::Stdio;
use std::sync::Mutex;
use anyhow::{bail, Result}; use anyhow::{Result, bail};
use argmax::Command; use argmax::Command;
use crate::exit_codes::{merge_exitcodes, ExitCode}; use crate::exec::command::OutputBuffer;
use crate::exit_codes::{ExitCode, merge_exitcodes};
use crate::fmt::{FormatTemplate, Token}; use crate::fmt::{FormatTemplate, Token};
use self::command::{execute_commands, handle_cmd_error}; use self::command::{execute_commands, handle_cmd_error};
@@ -80,14 +80,14 @@ impl CommandSet {
&self, &self,
input: &Path, input: &Path,
path_separator: Option<&str>, path_separator: Option<&str>,
out_perm: &Mutex<()>, null_separator: bool,
buffer_output: bool, buffer_output: bool,
) -> ExitCode { ) -> ExitCode {
let commands = self let commands = self
.commands .commands
.iter() .iter()
.map(|c| c.generate(input, path_separator)); .map(|c| c.generate(input, path_separator));
execute_commands(commands, out_perm, buffer_output) execute_commands(commands, OutputBuffer::new(null_separator), buffer_output)
} }
pub fn execute_batch<I>(&self, paths: I, limit: usize, path_separator: Option<&str>) -> ExitCode pub fn execute_batch<I>(&self, paths: I, limit: usize, path_separator: Option<&str>) -> ExitCode
+1 -1
View File
@@ -1,7 +1,7 @@
use std::process; use std::process;
#[cfg(unix)] #[cfg(unix)]
use nix::sys::signal::{raise, signal, SigHandler, Signal}; use nix::sys::signal::{SigHandler, Signal, raise, signal};
#[derive(Debug, Clone, Copy, PartialEq, Eq)] #[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum ExitCode { pub enum ExitCode {
+2 -2
View File
@@ -100,13 +100,13 @@ pub fn is_pipe(_: fs::FileType) -> bool {
} }
#[cfg(any(unix, target_os = "redox"))] #[cfg(any(unix, target_os = "redox"))]
pub fn osstr_to_bytes(input: &OsStr) -> Cow<[u8]> { pub fn osstr_to_bytes(input: &OsStr) -> Cow<'_, [u8]> {
use std::os::unix::ffi::OsStrExt; use std::os::unix::ffi::OsStrExt;
Cow::Borrowed(input.as_bytes()) Cow::Borrowed(input.as_bytes())
} }
#[cfg(windows)] #[cfg(windows)]
pub fn osstr_to_bytes(input: &OsStr) -> Cow<[u8]> { pub fn osstr_to_bytes(input: &OsStr) -> Cow<'_, [u8]> {
let string = input.to_string_lossy(); let string = input.to_string_lossy();
match string { match string {
+1 -1
View File
@@ -1,4 +1,4 @@
use anyhow::{anyhow, Result}; use anyhow::{Result, anyhow};
use nix::unistd::{Group, User}; use nix::unistd::{Group, User};
use std::fs; use std::fs;
+51 -31
View File
@@ -1,4 +1,4 @@
use jiff::{civil::DateTime, tz::TimeZone, Span, Timestamp, Zoned}; use jiff::{Span, Timestamp, Zoned, civil::DateTime, tz::TimeZone};
use std::time::{Duration, SystemTime, UNIX_EPOCH}; use std::time::{Duration, SystemTime, UNIX_EPOCH};
@@ -114,16 +114,22 @@ mod tests {
assert!(!TimeFilter::before("2min").unwrap().applies_to(&t1m_ago)); assert!(!TimeFilter::before("2min").unwrap().applies_to(&t1m_ago));
let t10s_before = "2010-10-10 10:10:00"; let t10s_before = "2010-10-10 10:10:00";
assert!(!TimeFilter::before(t10s_before) assert!(
.unwrap() !TimeFilter::before(t10s_before)
.applies_to(&ref_time)); .unwrap()
assert!(TimeFilter::before(t10s_before) .applies_to(&ref_time)
.unwrap() );
.applies_to(&t1m_ago)); assert!(
TimeFilter::before(t10s_before)
.unwrap()
.applies_to(&t1m_ago)
);
assert!(TimeFilter::after(t10s_before) assert!(
.unwrap() TimeFilter::after(t10s_before)
.applies_to(&ref_time)); .unwrap()
.applies_to(&ref_time)
);
assert!(!TimeFilter::after(t10s_before).unwrap().applies_to(&t1m_ago)); assert!(!TimeFilter::after(t10s_before).unwrap().applies_to(&t1m_ago));
let same_day = "2010-10-10"; let same_day = "2010-10-10";
@@ -142,16 +148,22 @@ mod tests {
ref_time = test_time.timestamp(); ref_time = test_time.timestamp();
let t1m_ago = ref_time - Duration::from_secs(60); let t1m_ago = ref_time - Duration::from_secs(60);
let t10s_before = "2010-10-10T10:10:00+00:00"; let t10s_before = "2010-10-10T10:10:00+00:00";
assert!(!TimeFilter::before(t10s_before) assert!(
.unwrap() !TimeFilter::before(t10s_before)
.applies_to(&ref_time)); .unwrap()
assert!(TimeFilter::before(t10s_before) .applies_to(&ref_time)
.unwrap() );
.applies_to(&t1m_ago)); assert!(
TimeFilter::before(t10s_before)
.unwrap()
.applies_to(&t1m_ago)
);
assert!(TimeFilter::after(t10s_before) assert!(
.unwrap() TimeFilter::after(t10s_before)
.applies_to(&ref_time)); .unwrap()
.applies_to(&ref_time)
);
assert!(!TimeFilter::after(t10s_before).unwrap().applies_to(&t1m_ago)); assert!(!TimeFilter::after(t10s_before).unwrap().applies_to(&t1m_ago));
let ref_timestamp = 1707723412u64; // Mon Feb 12 07:36:52 UTC 2024 let ref_timestamp = 1707723412u64; // Mon Feb 12 07:36:52 UTC 2024
@@ -166,17 +178,25 @@ mod tests {
let t1s_later = ref_time + Duration::from_secs(1); let t1s_later = ref_time + Duration::from_secs(1);
// Timestamp only supported via '@' prefix // Timestamp only supported via '@' prefix
assert!(TimeFilter::before(&ref_timestamp.to_string()).is_none()); assert!(TimeFilter::before(&ref_timestamp.to_string()).is_none());
assert!(TimeFilter::before(&format!("@{ref_timestamp}")) assert!(
.unwrap() TimeFilter::before(&format!("@{ref_timestamp}"))
.applies_to(&t1m_ago)); .unwrap()
assert!(!TimeFilter::before(&format!("@{ref_timestamp}")) .applies_to(&t1m_ago)
.unwrap() );
.applies_to(&t1s_later)); assert!(
assert!(!TimeFilter::after(&format!("@{ref_timestamp}")) !TimeFilter::before(&format!("@{ref_timestamp}"))
.unwrap() .unwrap()
.applies_to(&t1m_ago)); .applies_to(&t1s_later)
assert!(TimeFilter::after(&format!("@{ref_timestamp}")) );
.unwrap() assert!(
.applies_to(&t1s_later)); !TimeFilter::after(&format!("@{ref_timestamp}"))
.unwrap()
.applies_to(&t1m_ago)
);
assert!(
TimeFilter::after(&format!("@{ref_timestamp}"))
.unwrap()
.applies_to(&t1s_later)
);
} }
} }
+1 -1
View File
@@ -131,7 +131,7 @@ impl FormatTemplate {
Placeholder => { Placeholder => {
s.push(Self::replace_separator(path.as_ref(), path_separator)) s.push(Self::replace_separator(path.as_ref(), path_separator))
} }
Text(ref string) => s.push(string), Text(string) => s.push(string),
} }
} }
s s
+1 -1
View File
@@ -58,7 +58,7 @@ fn host() -> &'static str {
#[cfg(not(unix))] #[cfg(not(unix))]
const fn host() -> &'static str { const fn host() -> &'static str {
"" "/"
} }
#[cfg(test)] #[cfg(test)]
+7 -3
View File
@@ -18,7 +18,7 @@ use std::io::IsTerminal;
use std::path::Path; use std::path::Path;
use std::sync::Arc; use std::sync::Arc;
use anyhow::{anyhow, bail, Context, Result}; use anyhow::{Context, Result, anyhow, bail};
use clap::{CommandFactory, Parser}; use clap::{CommandFactory, Parser};
use globset::GlobBuilder; use globset::GlobBuilder;
use lscolors::LsColors; use lscolors::LsColors;
@@ -36,18 +36,21 @@ use crate::regex_helper::{pattern_has_uppercase_char, pattern_matches_strings_wi
// We use jemalloc for performance reasons, see https://github.com/sharkdp/fd/pull/481 // We use jemalloc for performance reasons, see https://github.com/sharkdp/fd/pull/481
// FIXME: re-enable jemalloc on macOS, see comment in Cargo.toml file for more infos // FIXME: re-enable jemalloc on macOS, see comment in Cargo.toml file for more infos
// This has to be kept in sync with the Cargo.toml file section that declares a
// dependency on tikv-jemallocator.
#[cfg(all( #[cfg(all(
not(windows), not(windows),
not(target_os = "android"), not(target_os = "android"),
not(target_os = "macos"), not(target_os = "macos"),
not(target_os = "freebsd"), not(target_os = "freebsd"),
not(target_os = "openbsd"), not(target_os = "openbsd"),
not(target_os = "illumos"),
not(all(target_env = "musl", target_pointer_width = "32")), not(all(target_env = "musl", target_pointer_width = "32")),
not(target_arch = "riscv64"), not(target_arch = "riscv64"),
feature = "use-jemalloc" feature = "use-jemalloc"
))] ))]
#[global_allocator] #[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
// vivid --color-mode 8-bit generate molokai // vivid --color-mode 8-bit generate molokai
const DEFAULT_LS_COLORS: &str = " const DEFAULT_LS_COLORS: &str = "
@@ -323,6 +326,7 @@ fn construct_config(mut opts: Opts, pattern_regexps: &[String]) -> Result<Config
actual_path_separator, actual_path_separator,
max_results: opts.max_results(), max_results: opts.max_results(),
strip_cwd_prefix: opts.strip_cwd_prefix(|| !(opts.null_separator || has_command)), strip_cwd_prefix: opts.strip_cwd_prefix(|| !(opts.null_separator || has_command)),
ignore_contain: opts.ignore_contain,
}) })
} }
@@ -482,7 +486,7 @@ fn build_regex(pattern_regex: String, config: &Config) -> Result<regex::bytes::R
"{}\n\nNote: You can use the '--fixed-strings' option to search for a \ "{}\n\nNote: You can use the '--fixed-strings' option to search for a \
literal string instead of a regular expression. Alternatively, you can \ literal string instead of a regular expression. Alternatively, you can \
also use the '--glob' option to match on a glob pattern.", also use the '--glob' option to match on a glob pattern.",
e.to_string() e
) )
}) })
} }
+5 -5
View File
@@ -15,11 +15,11 @@ fn replace_path_separator(path: &str, new_path_separator: &str) -> String {
// TODO: this function is performance critical and can probably be optimized // TODO: this function is performance critical and can probably be optimized
pub fn print_entry<W: Write>(stdout: &mut W, entry: &DirEntry, config: &Config) -> io::Result<()> { pub fn print_entry<W: Write>(stdout: &mut W, entry: &DirEntry, config: &Config) -> io::Result<()> {
let mut has_hyperlink = false; let mut has_hyperlink = false;
if config.hyperlink { if config.hyperlink
if let Some(url) = PathUrl::new(entry.path()) { && let Some(url) = PathUrl::new(entry.path())
write!(stdout, "\x1B]8;;{url}\x1B\\")?; {
has_hyperlink = true; write!(stdout, "\x1B]8;;{url}\x1B\\")?;
} has_hyperlink = true;
} }
if let Some(ref format) = config.format { if let Some(ref format) = config.format {
+1 -1
View File
@@ -1,5 +1,5 @@
use regex_syntax::hir::Hir;
use regex_syntax::ParserBuilder; use regex_syntax::ParserBuilder;
use regex_syntax::hir::Hir;
/// Determine if a regex pattern contains a literal uppercase character. /// Determine if a regex pattern contains a literal uppercase character.
pub fn pattern_has_uppercase_char(pattern: &str) -> bool { pub fn pattern_has_uppercase_char(pattern: &str) -> bool {
+72 -56
View File
@@ -8,8 +8,8 @@ use std::sync::{Arc, Mutex, MutexGuard};
use std::thread; use std::thread;
use std::time::{Duration, Instant}; use std::time::{Duration, Instant};
use anyhow::{anyhow, Result}; use anyhow::{Result, anyhow};
use crossbeam_channel::{bounded, Receiver, RecvTimeoutError, SendError, Sender}; use crossbeam_channel::{Receiver, RecvTimeoutError, SendError, Sender, bounded};
use etcetera::BaseStrategy; use etcetera::BaseStrategy;
use ignore::overrides::{Override, OverrideBuilder}; use ignore::overrides::{Override, OverrideBuilder};
use ignore::{WalkBuilder, WalkParallel, WalkState}; use ignore::{WalkBuilder, WalkParallel, WalkState};
@@ -19,7 +19,7 @@ use crate::config::Config;
use crate::dir_entry::DirEntry; use crate::dir_entry::DirEntry;
use crate::error::print_error; use crate::error::print_error;
use crate::exec; use crate::exec;
use crate::exit_codes::{merge_exitcodes, ExitCode}; use crate::exit_codes::{ExitCode, merge_exitcodes};
use crate::filesystem; use crate::filesystem;
use crate::output; use crate::output;
@@ -218,10 +218,10 @@ impl<'a, W: Write> ReceiverBuffer<'a, W> {
} }
self.num_results += 1; self.num_results += 1;
if let Some(max_results) = self.config.max_results { if let Some(max_results) = self.config.max_results
if self.num_results >= max_results { && self.num_results >= max_results
return self.stop(); {
} return self.stop();
} }
} }
WorkerResult::Error(err) => { WorkerResult::Error(err) => {
@@ -250,11 +250,11 @@ impl<'a, W: Write> ReceiverBuffer<'a, W> {
/// Output a path. /// Output a path.
fn print(&mut self, entry: &DirEntry) -> Result<(), ExitCode> { fn print(&mut self, entry: &DirEntry) -> Result<(), ExitCode> {
if let Err(e) = output::print_entry(&mut self.stdout, entry, self.config) { if let Err(e) = output::print_entry(&mut self.stdout, entry, self.config)
if e.kind() != ::std::io::ErrorKind::BrokenPipe { && e.kind() != ::std::io::ErrorKind::BrokenPipe
print_error(format!("Could not write to output: {e}")); {
return Err(ExitCode::GeneralError); print_error(format!("Could not write to output: {e}"));
} return Err(ExitCode::GeneralError);
} }
if self.interrupt_flag.load(Ordering::Relaxed) { if self.interrupt_flag.load(Ordering::Relaxed) {
@@ -368,18 +368,18 @@ impl WorkerState {
builder.add_custom_ignore_filename(".fdignore"); builder.add_custom_ignore_filename(".fdignore");
} }
if config.read_global_ignore { if config.read_global_ignore
if let Ok(basedirs) = etcetera::choose_base_strategy() { && let Ok(basedirs) = etcetera::choose_base_strategy()
let global_ignore_file = basedirs.config_dir().join("fd").join("ignore"); {
if global_ignore_file.is_file() { let global_ignore_file = basedirs.config_dir().join("fd").join("ignore");
let result = builder.add_ignore(global_ignore_file); if global_ignore_file.is_file() {
match result { let result = builder.add_ignore(global_ignore_file);
Some(ignore::Error::Partial(_)) => (), match result {
Some(err) => { Some(ignore::Error::Partial(_)) => (),
print_error(format!("Malformed pattern in global ignore file. {err}.")); Some(err) => {
} print_error(format!("Malformed pattern in global ignore file. {err}."));
None => (),
} }
None => (),
} }
} }
} }
@@ -413,8 +413,6 @@ impl WorkerState {
if cmd.in_batch_mode() { if cmd.in_batch_mode() {
exec::batch(rx.into_iter().flatten(), cmd, config) exec::batch(rx.into_iter().flatten(), cmd, config)
} else { } else {
let out_perm = Mutex::new(());
thread::scope(|scope| { thread::scope(|scope| {
// Each spawned job will store its thread handle in here. // Each spawned job will store its thread handle in here.
let threads = config.threads; let threads = config.threads;
@@ -423,8 +421,8 @@ impl WorkerState {
let rx = rx.clone(); let rx = rx.clone();
// Spawn a job thread that will listen for and execute inputs. // Spawn a job thread that will listen for and execute inputs.
let handle = scope let handle =
.spawn(|| exec::job(rx.into_iter().flatten(), cmd, &out_perm, config)); scope.spawn(|| exec::job(rx.into_iter().flatten(), cmd, config));
// Push the handle of the spawned thread into the vector for later joining. // Push the handle of the spawned thread into the vector for later joining.
handles.push(handle); handles.push(handle);
@@ -449,11 +447,12 @@ impl WorkerState {
let quit_flag = self.quit_flag.as_ref(); let quit_flag = self.quit_flag.as_ref();
let mut limit = 0x100; let mut limit = 0x100;
if let Some(cmd) = &config.command { if let Some(cmd) = &config.command
if !cmd.in_batch_mode() && config.threads > 1 { && !cmd.in_batch_mode()
// Evenly distribute work between multiple receivers && config.threads > 1
limit = 1; {
} // Evenly distribute work between multiple receivers
limit = 1;
} }
let mut tx = BatchSender::new(tx.clone(), limit); let mut tx = BatchSender::new(tx.clone(), limit);
@@ -462,11 +461,28 @@ impl WorkerState {
return WalkState::Quit; return WalkState::Quit;
} }
let entry = match entry { if let Ok(e) = &entry {
Ok(ref e) if e.depth() == 0 => { // If the entry is a directory that contains a
// "ignore contain" file", we want to skip this
// directory.
// Check the filetype first to avoid unnecessary
// syscalls.
if e.file_type().is_some_and(|t| t.is_dir()) {
let entry_path = e.path();
if config
.ignore_contain
.iter()
.any(|ic| entry_path.join(ic).exists())
{
return WalkState::Skip;
}
}
if e.depth() == 0 {
// Skip the root directory entry. // Skip the root directory entry.
return WalkState::Continue; return WalkState::Continue;
} }
}
let entry = match entry {
Ok(e) => DirEntry::normal(e), Ok(e) => DirEntry::normal(e),
Err(ignore::Error::WithPath { Err(ignore::Error::WithPath {
path, path,
@@ -488,21 +504,21 @@ impl WorkerState {
})) { })) {
Ok(_) => WalkState::Continue, Ok(_) => WalkState::Continue,
Err(_) => WalkState::Quit, Err(_) => WalkState::Quit,
} };
} }
}, },
Err(err) => { Err(err) => {
return match tx.send(WorkerResult::Error(err)) { return match tx.send(WorkerResult::Error(err)) {
Ok(_) => WalkState::Continue, Ok(_) => WalkState::Continue,
Err(_) => WalkState::Quit, Err(_) => WalkState::Quit,
} };
} }
}; };
if let Some(min_depth) = config.min_depth { if let Some(min_depth) = config.min_depth
if entry.depth().map_or(true, |d| d < min_depth) { && entry.depth().is_none_or(|d| d < min_depth)
return WalkState::Continue; {
} return WalkState::Continue;
} }
// Check the name first, since it doesn't require metadata // Check the name first, since it doesn't require metadata
@@ -542,10 +558,10 @@ impl WorkerState {
} }
// Filter out unwanted file types. // Filter out unwanted file types.
if let Some(ref file_types) = config.file_types { if let Some(ref file_types) = config.file_types
if file_types.should_ignore(&entry) { && file_types.should_ignore(&entry)
return WalkState::Continue; {
} return WalkState::Continue;
} }
#[cfg(unix)] #[cfg(unix)]
@@ -584,24 +600,24 @@ impl WorkerState {
// Filter out unwanted modification times // Filter out unwanted modification times
if !config.time_constraints.is_empty() { if !config.time_constraints.is_empty() {
let mut matched = false; let mut matched = false;
if let Some(metadata) = entry.metadata() { if let Some(metadata) = entry.metadata()
if let Ok(modified) = metadata.modified() { && let Ok(modified) = metadata.modified()
matched = config {
.time_constraints matched = config
.iter() .time_constraints
.all(|tf| tf.applies_to(&modified)); .iter()
} .all(|tf| tf.applies_to(&modified));
} }
if !matched { if !matched {
return WalkState::Continue; return WalkState::Continue;
} }
} }
if config.is_printing() { if config.is_printing()
if let Some(ls_colors) = &config.ls_colors { && let Some(ls_colors) = &config.ls_colors
// Compute colors in parallel {
entry.style(ls_colors); // Compute colors in parallel
} entry.style(ls_colors);
} }
let send_result = tx.send(WorkerResult::Entry(entry)); let send_result = tx.send(WorkerResult::Entry(entry));
+2 -12
View File
@@ -74,18 +74,8 @@ fn create_config_directory_with_global_ignore(ignore_file_content: &str) -> io::
/// Find the *fd* executable. /// Find the *fd* executable.
fn find_fd_exe() -> PathBuf { fn find_fd_exe() -> PathBuf {
// Tests exe is in target/debug/deps, the *fd* exe is in target/debug // Read the location of the fd executable from the environment
let root = env::current_exe() PathBuf::from(env::var("CARGO_BIN_EXE_fd").unwrap_or(env!("CARGO_BIN_EXE_fd").to_string()))
.expect("tests executable")
.parent()
.expect("tests executable directory")
.parent()
.expect("fd executable directory")
.to_path_buf();
let exe_name = if cfg!(windows) { "fd.exe" } else { "fd" };
root.join(exe_name)
} }
/// Format an error message for when *fd* did not exit successfully. /// Format an error message for when *fd* did not exit successfully.
+74 -8
View File
@@ -1765,12 +1765,10 @@ fn test_exec() {
} }
} }
// TODO test for windows
#[cfg(not(windows))]
#[test] #[test]
fn test_exec_multi() { fn test_exec_multi() {
// TODO test for windows
if cfg!(windows) {
return;
}
let (te, abs_path) = get_test_env_with_abs_path(DEFAULT_DIRS, DEFAULT_FILES); let (te, abs_path) = get_test_env_with_abs_path(DEFAULT_DIRS, DEFAULT_FILES);
te.assert_output( te.assert_output(
@@ -1813,9 +1811,11 @@ fn test_exec_multi() {
e1 e2", e1 e2",
); );
// We use printf here because we need to suppress a newline and
// echo -n is not POSIX-compliant.
te.assert_output( te.assert_output(
&[ &[
"foo", "--exec", "echo", "-n", "{/}: ", ";", "--exec", "echo", "{//}", "foo", "--exec", "printf", "%s", "{/}: ", ";", "--exec", "printf", "%s\\n", "{//}",
], ],
"a.foo: . "a.foo: .
b.foo: ./one b.foo: ./one
@@ -1826,6 +1826,21 @@ fn test_exec_multi() {
); );
} }
#[cfg(not(windows))]
#[test]
fn test_exec_nulls() {
let te = TestEnv::new(DEFAULT_DIRS, DEFAULT_FILES);
te.assert_output(
&["foo", "--print0", "--exec", "printf", "p=%s"],
"p=./a.fooNULL
p=./one/b.fooNULL
p=./one/two/C.Foo2NULL
p=./one/two/c.fooNULL
p=./one/two/three/d.fooNULL
p=./one/two/three/directory_fooNULL",
);
}
#[test] #[test]
fn test_exec_batch() { fn test_exec_batch() {
let (te, abs_path) = get_test_env_with_abs_path(DEFAULT_DIRS, DEFAULT_FILES); let (te, abs_path) = get_test_env_with_abs_path(DEFAULT_DIRS, DEFAULT_FILES);
@@ -2450,7 +2465,7 @@ fn test_max_results() {
assert_just_one_result_with_option("--max-results=1"); assert_just_one_result_with_option("--max-results=1");
assert_just_one_result_with_option("-1"); assert_just_one_result_with_option("-1");
// check that --max-results & -1 conflic with --exec // check that --max-results & -1 conflict with --exec
te.assert_failure(&["thing", "--max-results=0", "--exec=cat"]); te.assert_failure(&["thing", "--max-results=0", "--exec=cat"]);
te.assert_failure(&["thing", "-1", "--exec=cat"]); te.assert_failure(&["thing", "-1", "--exec=cat"]);
te.assert_failure(&["thing", "--max-results=1", "-1", "--exec=cat"]); te.assert_failure(&["thing", "--max-results=1", "-1", "--exec=cat"]);
@@ -2601,7 +2616,7 @@ fn test_strip_cwd_prefix() {
/// When fd is ran from a non-existent working directory, but an existent /// When fd is ran from a non-existent working directory, but an existent
/// directory is passed in the arguments, it should still run fine /// directory is passed in the arguments, it should still run fine
#[test] #[test]
#[cfg(not(windows))] #[cfg(all(not(windows), not(target_os = "illumos")))]
fn test_invalid_cwd() { fn test_invalid_cwd() {
let te = TestEnv::new(&[], &[]); let te = TestEnv::new(&[], &[]);
@@ -2682,7 +2697,7 @@ fn test_hyperlink() {
#[cfg(unix)] #[cfg(unix)]
let hostname = nix::unistd::gethostname().unwrap().into_string().unwrap(); let hostname = nix::unistd::gethostname().unwrap().into_string().unwrap();
#[cfg(not(unix))] #[cfg(not(unix))]
let hostname = ""; let hostname = "/";
let expected = format!( let expected = format!(
"\x1b]8;;file://{}{}/a.foo\x1b\\a.foo\x1b]8;;\x1b\\", "\x1b]8;;file://{}{}/a.foo\x1b\\a.foo\x1b]8;;\x1b\\",
@@ -2692,3 +2707,54 @@ fn test_hyperlink() {
te.assert_output(&["--hyperlink=always", "a.foo"], &expected); te.assert_output(&["--hyperlink=always", "a.foo"], &expected);
} }
#[test]
fn test_ignore_contain() {
let te = TestEnv::new(
&["include", "exclude", "exclude/sub", "other"],
&[
"top",
"include/foo",
"exclude/CACHEDIR.TAG",
"exclude/sub/nope",
"other/ignoremyparent",
],
);
let expected = "include/
include/foo
symlink
top";
te.assert_output(
&[
"--ignore-contain=CACHEDIR.TAG",
"--ignore-contain=ignoremyparent",
".",
],
expected,
);
}
#[test]
fn test_ignore_contain_precedence_over_depth_check() {
let te = TestEnv::new(
&["include", "exclude", "exclude/sub"],
&[
"top",
"include/foo",
"exclude/CACHEDIR.TAG",
"exclude/sub/nope",
],
);
let expected = "include/foo";
te.assert_output(
&["--ignore-contain=CACHEDIR.TAG", "--min-depth=2", "."],
expected,
);
}
#[test]
fn test_ignore_contain_precedence_over_root_check() {
let te = TestEnv::new(&["include"], &["CACHEDIR.TAG", "top", "include/foo"]);
let expected = "";
te.assert_output(&["--ignore-contain=CACHEDIR.TAG", "."], expected);
}