Some minor fixes

Co-authored-by: Mélanie Chauvel <perso@hack-libre.org>

Also add more spaces to make the descriptions of other options align that of `-n`.
This commit is contained in:
b05902132 2021-03-20 08:26:53 +08:00 committed by b05902132
parent 4ea79ee11d
commit 46a3e59e66
3 changed files with 23 additions and 23 deletions

View File

@ -65,7 +65,7 @@ complete -c exa -s 't' -l 'time' -x -d "Which timestamp field to list" -a "
created\t'Display created time'
"
complete -c exa -s 'm' -l 'modified' -d "Use the modified timestamp field"
complete -c -exa -s 'n' -l 'numeric-uid-gid' -d "List numeric user and group IDs."
complete -c exa -s 'n' -l 'numeric-uid-gid' -d "List numeric user and group IDs."
complete -c exa -l 'changed' -d "Use the changed timestamp field"
complete -c exa -s 'u' -l 'accessed' -d "Use the accessed timestamp field"
complete -c exa -s 'U' -l 'created' -d "Use the created timestamp field"

View File

@ -266,12 +266,12 @@ impl TimeFormat {
}
}
impl UserFormat {
fn deduce(matches: &MatchedFlags<'_>) -> Result<Self, OptionsError> {
let flag = matches.has(&flags::NUM_UGID)?;
Ok(if flag { Self::Numeric } else { Self::Name })
}
}