Repository: atuinsh/atuin (language: rust)

Issue:
[Bug]: sync_frequency = "0" never syncs
### What did you expect to happen?

Atuin syncs after every command.

### What happened?

Atuin never syncs. A manual sync using `atuin sync` still works, as does using `"1s"` as the frequency.

I suspect this broke in 18.3.0.

### Atuin doctor output

```yaml
{
  "atuin": {
    "version": "18.3.0",
    "sync": {
      "cloud": false,
      "records": true,
      "auto_sync": true,
      "last_sync": "2024-06-17 6:41:34.445861124 +00:00:00"
    },
    "sqlite_version": "3.44.0"
  },
  "shell": {
    "name": "zsh",
    "default": "zsh",
    "plugins": [
      "atuin"
    ],
    "preexec": "built-in"
  },
  "system": {
    "os": "Arch Linux",
    "arch": "x86_64",
    "version": "rolling",
    "disks": [
      {
        "name": "/dev/mapper/cornicle-root",
        "filesystem": "btrfs"
      },
      {
        "name": "/dev/nvme0n1p1",
        "filesystem": "vfat"
      }
    ]
  }
}
```


### Code of Conduct

- [X] I agree to follow this project's Code of Conduct


Discussion / hints:
Could you also share your config file please?
```toml
update_check = false
sync_address = "http://<redacted>"
sync_frequency = "0"
style = "compact"
inline_height = 15
scroll_context_lines = 2
secrets_filter = false
enter_accept = false
[stats]
[keys]
[sync]
records = true
[preview]
[daemon]
```
The regression was introduced here: https://github.com/atuinsh/atuin/pull/2074

Error:

```
Error: failed to check sync: time unit needed, for example 0sec or 0ms

Location:
    crates/atuin-client/src/settings.rs:561:27
```

Settings

```
sync_frequency = "0s"
```

should resolve it

I'll push a patch to make the unitless version work, though really consistent units make sense

Fix patch:
diff --git a/crates/atuin-client/src/settings.rs b/crates/atuin-client/src/settings.rs
index 0f1b443a986..c0ead292fac 100644
--- a/crates/atuin-client/src/settings.rs
+++ b/crates/atuin-client/src/settings.rs
@@ -553,6 +553,10 @@ impl Settings {
             return Ok(false);
         }
 
+        if self.sync_frequency == "0" {
+            return Ok(true);
+        }
+
         match parse_duration(self.sync_frequency.as_str()) {
             Ok(d) => {
                 let d = time::Duration::try_from(d).unwrap();


Test patch: