Skip to content

Commit 906b15b

Browse files
committed
ignore hidden directories by default while scanning
1 parent fe7def4 commit 906b15b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/cli.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ pub enum Commands {
3131
#[arg(short, long, group = "directories")]
3232
#[arg(default_value_t = false)]
3333
all: bool,
34-
/// Don't scan hidden directories
34+
/// Allow scanning hidden directories
3535
#[arg(long)]
3636
#[arg(default_value_t = false)]
37-
no_hidden: bool
37+
hidden: bool
3838
},
3939
/// Print the list of tracked repositories
4040
List,

src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ async fn main() {
8989

9090
// Handle command-line interactions
9191
match Cli::parse().get_command() {
92-
Commands::Scan { dirs, all, no_hidden} => {
92+
Commands::Scan { dirs, all, hidden} => {
9393
if *all {
94-
if let Err(e) = scan_all(home_dir, &tracking_file, !no_hidden) {
94+
if let Err(e) = scan_all(home_dir, &tracking_file, *hidden) {
9595
handle_error(&e, 2);
9696
}
9797
}
98-
else if let Err(e) = scan_dirs(dirs.to_owned(), &tracking_file, !no_hidden) {
98+
else if let Err(e) = scan_dirs(dirs.to_owned(), &tracking_file, *hidden) {
9999
handle_error(&e, 2);
100100
}
101101
},

0 commit comments

Comments
 (0)