diff options
Diffstat (limited to 'src/command/client/sync.rs')
| -rw-r--r-- | src/command/client/sync.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/command/client/sync.rs b/src/command/client/sync.rs new file mode 100644 index 00000000..f8bfd5e2 --- /dev/null +++ b/src/command/client/sync.rs @@ -0,0 +1,19 @@ +use eyre::Result; + +use atuin_client::database::Database; +use atuin_client::settings::Settings; +use atuin_client::sync; + +pub async fn run( + settings: &Settings, + force: bool, + db: &mut (impl Database + Send + Sync), +) -> Result<()> { + sync::sync(settings, force, db).await?; + println!( + "Sync complete! {} items in database, force: {}", + db.history_count().await?, + force + ); + Ok(()) +} |
