aboutsummaryrefslogtreecommitdiffstats
path: root/src/command/client/sync/status.rs
diff options
context:
space:
mode:
authorVladislav Stepanov <8uk.8ak@gmail.com>2023-04-14 23:18:58 +0400
committerGitHub <noreply@github.com>2023-04-14 20:18:58 +0100
commitc05d2850420a2c163b8f62c33a6cef7c0ae1ad8d (patch)
tree2c44a44eda7e76fa74e78ac1fd02f55c1ed4d804 /src/command/client/sync/status.rs
parentSwitch to uuidv7 (#864) (diff)
downloadatuin-c05d2850420a2c163b8f62c33a6cef7c0ae1ad8d.zip
Workspace reorder (#868)
* Try different workspace structure Move main crate (atuin) to be on the same level with other crates in this workspace * extract common dependencies to the workspace definition * fix base64 v0.21 deprecation warning * questionable: update deps & fix chrono deprecations possible panic sites are unchanged, they're just more visible now * Revert "questionable: update deps & fix chrono deprecations" This reverts commit 993e60f8dea81a1625a04285a617959ad09a0866.
Diffstat (limited to 'src/command/client/sync/status.rs')
-rw-r--r--src/command/client/sync/status.rs35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/command/client/sync/status.rs b/src/command/client/sync/status.rs
deleted file mode 100644
index b3e73e8e..00000000
--- a/src/command/client/sync/status.rs
+++ /dev/null
@@ -1,35 +0,0 @@
-use atuin_client::{
- api_client, database::Database, encryption::load_encoded_key, settings::Settings,
-};
-use colored::Colorize;
-use eyre::Result;
-
-pub async fn run(settings: &Settings, db: &impl Database) -> Result<()> {
- let client = api_client::Client::new(
- &settings.sync_address,
- &settings.session_token,
- load_encoded_key(settings)?,
- )?;
-
- let status = client.status().await?;
- let last_sync = Settings::last_sync()?;
- let local_count = db.history_count().await?;
-
- println!("{}", "[Local]".green());
-
- if settings.auto_sync {
- println!("Sync frequency: {}", settings.sync_frequency);
- println!("Last sync: {last_sync}");
- }
-
- println!("History count: {local_count}\n");
-
- if settings.auto_sync {
- println!("{}", "[Remote]".green());
- println!("Address: {}", settings.sync_address);
- println!("Username: {}", status.username);
- println!("History count: {}", status.count);
- }
-
- Ok(())
-}