Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link to exit code info #5311

Merged
merged 1 commit into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions clap_builder/src/builder/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ impl Command {
Error::raw(kind, message).format(self)
}

/// Parse [`env::args_os`], exiting on failure.
/// Parse [`env::args_os`], [exiting][Error::exit] on failure.
///
/// # Panics
///
Expand All @@ -610,7 +610,7 @@ impl Command {
self.get_matches_from(env::args_os())
}

/// Parse [`env::args_os`], exiting on failure.
/// Parse [`env::args_os`], [exiting][Error::exit] on failure.
///
/// Like [`Command::get_matches`] but doesn't consume the `Command`.
///
Expand Down Expand Up @@ -670,7 +670,7 @@ impl Command {
self.try_get_matches_from(env::args_os())
}

/// Parse the specified arguments, exiting on failure.
/// Parse the specified arguments, [exiting][Error::exit] on failure.
///
/// **NOTE:** The first argument will be parsed as the binary name unless
/// [`Command::no_binary_name`] is used.
Expand Down
6 changes: 3 additions & 3 deletions clap_builder/src/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use std::ffi::OsString;
///
/// **NOTE:** Deriving requires the `derive` feature flag
pub trait Parser: FromArgMatches + CommandFactory + Sized {
/// Parse from `std::env::args_os()`, exit on error
/// Parse from `std::env::args_os()`, [exit][Error::exit] on error.
fn parse() -> Self {
let mut matches = <Self as CommandFactory>::command().get_matches();
let res = <Self as FromArgMatches>::from_arg_matches_mut(&mut matches)
Expand All @@ -43,7 +43,7 @@ pub trait Parser: FromArgMatches + CommandFactory + Sized {
<Self as FromArgMatches>::from_arg_matches_mut(&mut matches).map_err(format_error::<Self>)
}

/// Parse from iterator, exit on error
/// Parse from iterator, [exit][Error::exit] on error.
fn parse_from<I, T>(itr: I) -> Self
where
I: IntoIterator<Item = T>,
Expand Down Expand Up @@ -72,7 +72,7 @@ pub trait Parser: FromArgMatches + CommandFactory + Sized {
<Self as FromArgMatches>::from_arg_matches_mut(&mut matches).map_err(format_error::<Self>)
}

/// Update from iterator, exit on error
/// Update from iterator, [exit][Error::exit] on error.
fn update_from<I, T>(&mut self, itr: I)
where
I: IntoIterator<Item = T>,
Expand Down