We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
asimov handle list
1 parent 2bf28e8 commit 22abf52Copy full SHA for 22abf52
1 file changed
src/commands/handle/list.rs
@@ -1,8 +1,19 @@
1
// This is free and unencumbered software released into the public domain.
2
3
use crate::StandardOptions;
4
+use asimov_directory::fs::HandleResolver;
5
+use color_print::ceprintln;
6
use core::error::Error;
7
+use futures_lite::{pin, stream::StreamExt};
8
9
pub async fn list(_flags: &StandardOptions) -> Result<(), Box<dyn Error>> {
- Ok(()) // TODO
10
+ let mut resolver = HandleResolver::default().await?;
11
+ let handles = resolver.handles();
12
+ pin!(handles);
13
+
14
+ while let Some(handle) = handles.next().await {
15
+ ceprintln!("{}", handle?);
16
+ }
17
18
+ Ok(())
19
}
0 commit comments