Skip to content

Commit

Permalink
chore(cli): Provide short options -H, -G
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpovel committed Aug 17, 2024
1 parent 2c1b9e8 commit 6a4848d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ Standalone Actions (only usable alone):
[aliases: squeeze-repeats]

Options (global):
--glob <GLOB>
-G, --glob <GLOB>
Glob of files to work on (instead of reading stdin).
If processing occurs, it is done in-place, overwriting originals.
Expand Down Expand Up @@ -1388,7 +1388,7 @@ Options (global):
--only-matching
Print only matching lines.

--hidden
-H, --hidden
Do not ignore hidden files and directories.

--gitignored
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ mod cli {
/// <https://docs.rs/glob/0.3.1/glob/struct.Pattern.html>
///
/// Names of processed files are written to stdout.
#[arg(long, verbatim_doc_comment, alias = "files")]
#[arg(short('G'), long, verbatim_doc_comment, alias = "files")]
pub glob: Option<glob::Pattern>,
/// Fail if working on files (e.g. globbing is requested) but none are found.
#[arg(long, verbatim_doc_comment, alias = "fail-empty-glob")]
Expand Down Expand Up @@ -1092,7 +1092,7 @@ mod cli {
#[arg(long, verbatim_doc_comment)]
pub only_matching: bool,
/// Do not ignore hidden files and directories.
#[arg(long, verbatim_doc_comment)]
#[arg(short('H'), long, verbatim_doc_comment)]
pub hidden: bool,
/// Do not ignore `.gitignore`d files and directories.
#[arg(long, verbatim_doc_comment)]
Expand Down

0 comments on commit 6a4848d

Please sign in to comment.