Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
nilehmann committed Sep 23, 2023
1 parent 78356b4 commit d593e95
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
11 changes: 11 additions & 0 deletions 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
Expand Up @@ -6,7 +6,7 @@ version = "0.1.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
clap = { version = "4.3.3", features = ["derive"] }
clap = { version = "4.3.3", features = ["derive", "wrap_help"] }
regex = "1.8.1"
termcolor = "1.2.0"
termion = "2.0.1"
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,24 @@ cargo install --git https://github.com/nilehmann/backtracetk
## Screenshot

![Screenshot](./screenshot.png)

## Usage

```bash
$ backtracetk --help
Print colorized Rust backtraces by capturing the output of an external process

Usage: backtracetk [OPTIONS] [CMD]...

Arguments:
[CMD]...

Options:
--style <STYLE> Set the backtrace style to short (RUST_BACKTRACE=1) or full (RUST_BACKTRACE=full)
[default: short] [possible values: short, full]
--no-lib-backtrace Set RUST_LIB_BACKTRACE=0
--hide-output By default, backtracetk prints every captured line as it reads it to get immediate
feedback. If this flag is set, this output is suppressed and nothing will be printed
until the program exits
-h, --help Print help
```
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use termcolor::{ColorChoice, StandardStream};

/// Print colorized Rust backtraces by capturing the output of an external process.
#[derive(clap::Parser)]
#[command(about, long_about = None)]
#[command(max_term_width = 110)]
struct Args {
#[arg(trailing_var_arg(true))]
cmd: Vec<String>,
Expand All @@ -19,8 +19,8 @@ struct Args {
#[arg(long)]
no_lib_backtrace: bool,

/// By default, backtracetk prints every captured line as it reads it. If this flag is set,
/// this output is suppressed and nothing will be printed until the program exits.
/// By default, backtracetk prints every captured line as it reads it to get immediate feedback.
/// If this flag is set, this output is suppressed and nothing will be printed until the program exits
#[arg(long)]
hide_output: bool,
}
Expand Down

0 comments on commit d593e95

Please sign in to comment.