Make sure that using `--no-ignore-vcs` or `--no-ignore` don't also
enable `--no-ignore-parent`. So that if `--no-ignore-vcs` is enabled, it
continues to respect .fdignore and .ignore in the parent directories.
Fixes: #907Fixes: #901
Those are:
- `--no-hidden`, which overrides `--hidden`
- `--ignore`, which overrides `--no-ignore`
- `--ignore-vcs`, which overrides `--no-ignore-vcs`
- `--no-follow`, which overrides `--follow`
- `--relative-path`, which overrides `--absolute-path`
When --path-separator is used, pass it on to commands run with
--exec(-batch) and --list-details.
On Windows, paths with drive letters (C:\foo) and UNC paths
(\\server\share\path) are handled as expected, though they're unlikely
to be found in normal usage of fd.
Fixes: https://github.com/sharkdp/fd/issues/697
With an empty pattern, --glob results in no matches. This does not
align with the behavior of --fixed-strings or --regex. Update the
initialization code to handle globs with empty patterns.
This new option can be used instead of piping to `head -n <count>` for
improved performance:
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|:---|---:|---:|---:|---:|
| `fd --max-buffer-time=0 flow.yaml` | 153.9 ± 2.5 | 151.3 | 170.3 | 4.21 ± 5.86 |
| `fd --max-buffer-time=0 flow.yaml \| head -n 1` | 145.3 ± 17.4 | 111.0 | 180.2 | 3.98 ± 5.55 |
| `fd --max-results=1 flow.yaml` | 36.5 ± 50.8 | 7.2 | 145.7 | 1.00 |
Note: there is a large standard deviation on the last result due to the
non-deterministic file system traversal. With `--max-results`, we don't
have to traverse the whole filesystem tree, so it's all about luck.
closes#472closes#476