Commit Graph

17 Commits

Author SHA1 Message Date
David Peter 9ea882d7cc Fix clippy suggestions 2022-09-11 21:29:43 +02:00
Tavian Barnes fe992706ae Raise SIGINT when dying by ^C
Fixes #854.
2021-11-15 07:53:57 +01:00
Tavian Barnes 2b1bf471b1 Add an exit() method to ExitCode 2021-11-15 07:53:57 +01:00
Niklas Mohrin 45a86459b2 Refactor: `merge_exit_codes` now takes an `impl IntoIterator<Item = ExitCode>`
This way, callers don't need to collect into a slice / vec.
2021-10-12 18:49:07 +02:00
Asha20 334488cab7
Add -q/--quiet/--has-match flag (#813)
Instead of printing to stdout, the program will return 1 as the exit
code if there are no matches and 0 otherwise.
2021-08-14 17:57:01 +02:00
David Peter 2a2126c40a Fix clippy warnings 2021-07-27 09:05:23 +02:00
sharkdp e42ddda5a6 Clean up exit code handling 2020-04-03 10:48:27 +02:00
fusillicode 0f2429cabc Add unit tests for merge_exitcodes 2020-02-22 12:32:35 +01:00
fusillicode 232e3937f2 Rename error_if_any_error to merge_exitcodes 2020-02-22 12:32:35 +01:00
fusillicode e23398e6d0 Extract error_if_any_error as free function 2020-02-22 12:32:35 +01:00
fusillicode a5fe138a25 Extract ExitCode::is_error helper 2020-02-22 12:32:35 +01:00
fusillicode b23cfc383f Switch back from Self to ExitCode 2020-02-22 12:32:35 +01:00
fusillicode 7213f5a88e Add collection of job & thread exit codes + default to ExitCode::Error if any ExitCode::Error 2020-02-22 12:32:35 +01:00
sharkdp a0505bd4df Expose exit status from `--exec-batch <cmd>`
closes #333
2019-09-13 23:05:35 +02:00
Josh Leeb-du Toit cb1cfa108b ErrorCode enum variants to be more descriptive 2018-10-03 16:06:18 +02:00
Josh Leeb-du Toit 8bdd8f8e8f Move exit code consts into enum
Previously, the constants defined in `src/exit_codes` weren't being
used, and the constants for exit codes were being redefined in the
`internals` module.

This PR removes the exit code consts and instead uses an enum defined in
`src/exit_codes`. This centralizes the definitions of exit codes making
them easier to modify and keep track of.
2018-10-03 16:06:18 +02:00
Dock 26ad7da347 Using wants_to_quit to exit the sender as well as the reciever (#211)
Closes #210
2018-01-03 09:26:11 +01:00