Skip to content

Commit

Permalink
Option to print contents to the console
Browse files Browse the repository at this point in the history
  • Loading branch information
dcodesdev committed Nov 2, 2024
1 parent f1e2b5f commit 324ed9f
Show file tree
Hide file tree
Showing 4 changed files with 9 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 = "clipcat"
version = "0.1.2"
version = "0.1.3"
edition = "2021"
description = "A command line tool for copying the contents to clipboard of multiple files in one go."
repository = "https://github.com/dcodesdev/clipcat"
Expand Down
3 changes: 3 additions & 0 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ pub struct Opts {

#[clap(short, long)]
pub token: bool,

#[clap(short)]
pub print: bool,
}
4 changes: 4 additions & 0 deletions src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,9 @@ pub fn run() -> anyhow::Result<()> {
println!("{} GPT-4 tokens.", tokens);
}

if opts.print {
println!("{}", contents);
}

Ok(())
}

0 comments on commit 324ed9f

Please sign in to comment.