Skip to content

Commit 324ed9f

Browse files
committed
Option to print contents to the console
1 parent f1e2b5f commit 324ed9f

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "clipcat"
3-
version = "0.1.2"
3+
version = "0.1.3"
44
edition = "2021"
55
description = "A command line tool for copying the contents to clipboard of multiple files in one go."
66
repository = "https://github.com/dcodesdev/clipcat"

src/cli.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@ pub struct Opts {
99

1010
#[clap(short, long)]
1111
pub token: bool,
12+
13+
#[clap(short)]
14+
pub print: bool,
1215
}

src/run.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,9 @@ pub fn run() -> anyhow::Result<()> {
2424
println!("{} GPT-4 tokens.", tokens);
2525
}
2626

27+
if opts.print {
28+
println!("{}", contents);
29+
}
30+
2731
Ok(())
2832
}

0 commit comments

Comments
 (0)