mirror of
https://github.com/ClementTsang/bottom.git
synced 2025-04-08 17:05:59 +02:00
Updated documentation, made error in args clearer
This commit is contained in:
parent
46f1b7df00
commit
648864176f
@ -170,6 +170,12 @@ Run using `btm`.
|
||||
|
||||
- `Enter` on a widget to maximize the widget.
|
||||
|
||||
- `+` to zoom in (reduce time interval, smallest is 30 seconds).
|
||||
|
||||
- `-` to zoom out (increase time interval, largest is 10 minutes).
|
||||
|
||||
- `=` to reset zoom.
|
||||
|
||||
#### CPU
|
||||
|
||||
- `/` to allow for enabling/disabling showing certain cores with `Space`.
|
||||
|
@ -199,11 +199,11 @@ pub fn get_default_time_value_option(
|
||||
|
||||
if default_time < 30000 {
|
||||
return Err(BottomError::InvalidArg(
|
||||
"Please set your default value to be at least 30 seconds.".to_string(),
|
||||
"Please set your default value to be at least 30000 milliseconds.".to_string(),
|
||||
));
|
||||
} else if default_time as u128 > STALE_MAX_MILLISECONDS as u128 {
|
||||
return Err(BottomError::InvalidArg(
|
||||
"Please set your default value to be at most 10 minutes.".to_string(),
|
||||
format!("Please set your default value to be at most {} milliseconds.", STALE_MAX_MILLISECONDS),
|
||||
));
|
||||
}
|
||||
|
||||
@ -227,11 +227,11 @@ pub fn get_time_interval_option(
|
||||
|
||||
if time_interval < 1000 {
|
||||
return Err(BottomError::InvalidArg(
|
||||
"Please set your time delta to be at least 1 second.".to_string(),
|
||||
"Please set your time delta to be at least 1000 milliseconds.".to_string(),
|
||||
));
|
||||
} else if time_interval > STALE_MAX_MILLISECONDS as u128 {
|
||||
return Err(BottomError::InvalidArg(
|
||||
"Please set your time delta to be at most 10 minutes.".to_string(),
|
||||
format!("Please set your time delta to be at most {} milliseconds.", STALE_MAX_MILLISECONDS),
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ fn test_large_default_time() -> Result<(), Box<dyn std::error::Error>> {
|
||||
.assert()
|
||||
.failure()
|
||||
.stderr(predicate::str::contains(
|
||||
"Please set your default value to be at most 10 minutes.",
|
||||
"Please set your default value to be at most",
|
||||
));
|
||||
Ok(())
|
||||
}
|
||||
@ -55,7 +55,7 @@ fn test_small_default_time() -> Result<(), Box<dyn std::error::Error>> {
|
||||
.assert()
|
||||
.failure()
|
||||
.stderr(predicate::str::contains(
|
||||
"Please set your default value to be at least 30 seconds.",
|
||||
"Please set your default value to be at least",
|
||||
));
|
||||
Ok(())
|
||||
}
|
||||
@ -68,7 +68,7 @@ fn test_large_delta_time() -> Result<(), Box<dyn std::error::Error>> {
|
||||
.assert()
|
||||
.failure()
|
||||
.stderr(predicate::str::contains(
|
||||
"Please set your time delta to be at most 10 minutes.",
|
||||
"Please set your time delta to be at most",
|
||||
));
|
||||
Ok(())
|
||||
}
|
||||
@ -81,7 +81,7 @@ fn test_small_delta_time() -> Result<(), Box<dyn std::error::Error>> {
|
||||
.assert()
|
||||
.failure()
|
||||
.stderr(predicate::str::contains(
|
||||
"Please set your time delta to be at least 1 second.",
|
||||
"Please set your time delta to be at least",
|
||||
));
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user