mirror of
https://github.com/sharkdp/fd.git
synced 2026-10-12 02:22:28 +00:00
feat: add --ignore-parent option to override --no-ignore-parent
Add the --ignore-parent flag, mirroring the existing pattern where --ignore-vcs overrides --no-ignore-vcs. This lets users undo --no-ignore-parent in aliases or config files. Closes #1958
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
# Unreleased
|
||||
|
||||
## Features
|
||||
- Add `--ignore-parent` option to override `--no-ignore-parent`, see #1958 (@tmchow)
|
||||
|
||||
## Bugfixes
|
||||
- Handle invalid working directories gracefully when using `--full-path`, see #1900 (@Xavrir).
|
||||
|
||||
|
||||
@@ -102,6 +102,7 @@ pub struct Opts {
|
||||
|
||||
/// Show search results from files and directories that would otherwise be
|
||||
/// ignored by '.gitignore', '.ignore', or '.fdignore' files in parent directories.
|
||||
/// The flag can be overridden with --ignore-parent.
|
||||
#[arg(
|
||||
long,
|
||||
hide_short_help = true,
|
||||
@@ -110,6 +111,10 @@ pub struct Opts {
|
||||
)]
|
||||
pub no_ignore_parent: bool,
|
||||
|
||||
/// Overrides --no-ignore-parent
|
||||
#[arg(long, overrides_with = "no_ignore_parent", hide = true, action = ArgAction::SetTrue)]
|
||||
ignore_parent: (),
|
||||
|
||||
/// Do not respect the global ignore file
|
||||
#[arg(long, hide = true)]
|
||||
pub no_global_ignore_file: bool,
|
||||
|
||||
Reference in New Issue
Block a user