-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Petr Gadorek
committed
Jul 4, 2024
1 parent
6244c77
commit d675b3f
Showing
8 changed files
with
458 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
use dialoguer::{theme::ColorfulTheme, FolderSelect}; | ||
|
||
fn main() { | ||
let selection = FolderSelect::with_theme(&ColorfulTheme::default()) | ||
.with_prompt("Select some sobfolder from /tmp") | ||
.folder("/tmp") | ||
.interact() | ||
.unwrap(); | ||
|
||
println!("Folder you selected: {}", selection); | ||
|
||
let selection = FolderSelect::with_theme(&ColorfulTheme::default()) | ||
.with_prompt("Select some file from /tmp") | ||
.folder("/tmp") | ||
.file(true) | ||
.interact() | ||
.unwrap(); | ||
|
||
println!("File you selected: {}", selection); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.