Skip to content

Commit

Permalink
help and version fixes #3
Browse files Browse the repository at this point in the history
  • Loading branch information
sectordistrict committed Nov 7, 2024
1 parent 97be2c0 commit ee326c9
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "intentrace"
version = "0.2.2"
version = "0.2.3"
description = "intentrace is strace with intent, it goes all the way for you instead of half the way."
edition = "2021"
license = "MIT"
Expand Down
24 changes: 24 additions & 0 deletions src/utilities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,30 @@ pub fn parse_args() -> Vec<String> {

while let Some(arg) = args.peek() {
match arg.as_str() {
"-h" | "--help" => {
// TODO!
// PENDING SWITCH TO CLAP
println!("intentrace is a strace for everyone.
Usage: intentrace [OPTIONS] [-- <TRAILING_ARGUMENTS>...]
Options:
-c, --summary provide a summary table at the end of tracing
-p, --attach <pid> attach to an already running proceess
-f, --follow-forks trace child processes when traced programs create them
-z, --failed-only only print failed syscalls
-q, --mute-stdout mute the traced program's std output
-h, --help print help
-v, --version print version
");
std::process::exit(0)
}
"-v" | "--version" => {
// TODO!
// PENDING SWITCH TO CLAP
println!("intentrace {}", env!("CARGO_PKG_VERSION"));
std::process::exit(0)
}
"-c" | "--summary" => {
let _ = args.next().unwrap();
// if FOLLOW_FORKS.get() {
Expand Down

0 comments on commit ee326c9

Please sign in to comment.