find: implement {} path substitution for -exec by Erickkaranja · Pull Request #620 · uutils/findutils · GitHub
Skip to content

find: implement {} path substitution for -exec#620

Open
Erickkaranja wants to merge 3 commits into
uutils:mainfrom
Erickkaranja:local
Open

find: implement {} path substitution for -exec#620
Erickkaranja wants to merge 3 commits into
uutils:mainfrom
Erickkaranja:local

Conversation

@Erickkaranja

Copy link
Copy Markdown

A utility_name or argument containing only the two characters "{}" shall be replaced by the current pathname.

A utility_name or argument containing only the two
characters "{}" shall be replaced by the current pathname.
@codecov

codecov Bot commented Jan 28, 2026

Copy link
Copy Markdown

Comment thread src/find/matchers/exec.rs Outdated
Comment on lines +56 to +61
let mut command;
if &self.executable == "{}" {
command = Command::new(file_info.path());
} else {
command = Command::new(&self.executable);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

A utility_name or argument containing only the two
characters "{}" shall be replaced by the current pathname.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants