diff options
author | jhspetersson <jhspetersson@gmail.com> | 2023-12-01 10:53:34 +0100 |
---|---|---|
committer | jhspetersson <jhspetersson@gmail.com> | 2023-12-01 10:53:34 +0100 |
commit | c8c476728add5dad7cb6125441516c9d5428238f (patch) | |
tree | 09583b677f8f40f97a1c9def8e0b4eba7bc05b1d | |
parent | e933427a3b266f9b1319c4de3133065257b95868 (diff) |
adjust and document check for updatespages
-rw-r--r-- | docs/usage.md | 11 | ||||
-rw-r--r-- | src/main.rs | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/docs/usage.md b/docs/usage.md index 3b05b68..88a95b9 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -430,7 +430,7 @@ Duration is measured in seconds. ### Configuration file -**fselect** tries to create a new configuration file if one doesn't exists. +**fselect** tries to create a new configuration file if one doesn't exist. Usual location on Linux: @@ -447,6 +447,15 @@ You can also specify config location with runtime option, e.g.: fselect --config /home/user_name/fselect_custom.toml name, size from /home/user_name/Music where is_audio = 1 +#### Check for updates + +**fselect** can be built with `update-notifications` feature, that enables automatic check for updates. +This check is disabled by default. To enable it, put + + check_for_updates = true + +into the config file. + ### Command-line arguments | Argument | Meaning | diff --git a/src/main.rs b/src/main.rs index d928075..b8d96e7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -169,7 +169,7 @@ fn main() -> ExitCode { if config.check_for_updates.unwrap_or(false) && stdout().is_terminal() { let name = env!("CARGO_PKG_NAME"); let version = env!("CARGO_PKG_VERSION"); - let informer = update_informer::new(registry::Crates, name, version).interval(Duration::from_secs(60 * 60)); + let informer = update_informer::new(registry::Crates, name, version).interval(Duration::from_secs(60 * 60 * 24)); if let Some(version) = informer.check_version().ok().flatten() { println!("\nNew version is available! : {}", version); |