mirror of
https://github.com/Llewellynvdm/exa.git
synced 2025-02-02 10:38:24 +00:00
Fix typo in error message
It said “(Choices: (choices: this, that, other))” instead of “(choices: this, that, other)”. Also improve the same error elsewhere: options more have ‘settings’ than ‘values’.
This commit is contained in:
parent
68e70bf036
commit
19b7780755
@ -14,7 +14,7 @@ pub struct Choices(&'static [&'static str]);
|
||||
|
||||
impl fmt::Display for Choices {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "(choices: {})", self.0.join(", "))
|
||||
write!(f, "choices: {}", self.0.join(", "))
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,7 +91,7 @@ impl fmt::Display for Misfire {
|
||||
use self::Misfire::*;
|
||||
|
||||
match *self {
|
||||
BadArgument(ref a, ref b, ref c) => write!(f, "Option {} has no value {:?} (Choices: {})", a, b, c),
|
||||
BadArgument(ref a, ref b, ref c) => write!(f, "Option {} has no {:?} setting ({})", a, b, c),
|
||||
InvalidOptions(ref e) => write!(f, "{}", e),
|
||||
Help(ref text) => write!(f, "{}", text),
|
||||
Version(ref version) => write!(f, "{}", version),
|
||||
|
1
xtests/error_setting
Normal file
1
xtests/error_setting
Normal file
@ -0,0 +1 @@
|
||||
Option --time-style has no "24" setting (choices: default, long-iso, full-iso, iso)
|
@ -252,13 +252,14 @@ EXA_COLORS="di=38;5;195:fi=38;5;250:xx=38;5;237:ur=38;5;194:uw=38;5;193:ux=38;5;
|
||||
EXA_COLORS="reset" $exa $testcases/file-names-exts -1 2>&1 | diff -q - $results/themed_un || exit 1
|
||||
|
||||
# Errors
|
||||
$exa --binary 2>&1 | diff -q - $results/error_useless || exit 1
|
||||
$exa --ternary 2>&1 | diff -q - $results/error_long || exit 1
|
||||
$exa -4 2>&1 | diff -q - $results/error_short || exit 1
|
||||
$exa --time 2>&1 | diff -q - $results/error_value || exit 1
|
||||
$exa --long=time 2>&1 | diff -q - $results/error_overvalued || exit 1
|
||||
$exa -l --long 2>&1 | diff -q - $results/error_duplicate || exit 1
|
||||
$exa -ll 2>&1 | diff -q - $results/error_twice || exit 1
|
||||
$exa --binary 2>&1 | diff -q - $results/error_useless || exit 1
|
||||
$exa --ternary 2>&1 | diff -q - $results/error_long || exit 1
|
||||
$exa -4 2>&1 | diff -q - $results/error_short || exit 1
|
||||
$exa --time 2>&1 | diff -q - $results/error_value || exit 1
|
||||
$exa --long=time 2>&1 | diff -q - $results/error_overvalued || exit 1
|
||||
$exa -l --long 2>&1 | diff -q - $results/error_duplicate || exit 1
|
||||
$exa -ll 2>&1 | diff -q - $results/error_twice || exit 1
|
||||
$exa -l --time-style=24 2>&1 | diff -q - $results/error_setting || exit 1
|
||||
|
||||
|
||||
# Debug mode
|
||||
|
Loading…
x
Reference in New Issue
Block a user