chore: PR feedback

This commit is contained in:
Stuart Carnie 2021-02-28 07:48:00 +11:00
parent 765fcf64c9
commit c946bab08e
No known key found for this signature in database
GPG Key ID: 848D9C9718D78B4F
6 changed files with 8 additions and 8 deletions

View File

@ -47,6 +47,7 @@ exas options are almost, but not quite, entirely unlike `ls`s.
- **--colo[u]r**: when to use terminal colours
- **--colo[u]r-scale**: highlight levels of file sizes distinctly
- **--icons**: display icons
- **--no-icons**: don't display icons (always overrides --icons)
### Filtering options

View File

@ -15,6 +15,7 @@ complete -c exa -l 'colour' -d "When to use terminal colours"
complete -c exa -l 'color-scale' -d "Highlight levels of file sizes distinctly"
complete -c exa -l 'colour-scale' -d "Highlight levels of file sizes distinctly"
complete -c exa -l 'icons' -d "Display icons"
complete -c exa -l 'no-icons' -d "Don't display icons"
# Filtering and sorting options
complete -c exa -l 'group-directories-first' -d "Sort directories before other files"

View File

@ -72,6 +72,9 @@ Valid settings are `always`, `automatic`, and `never`.
`--icons`
: Display icons next to file names.
`--no-icons`
: Don't display icons. (Always overrides --icons)
FILTERING AND SORTING OPTIONS
=============================

View File

@ -24,13 +24,8 @@ impl Classify {
}
impl ShowIcons {
fn enable_icons(matches: &MatchedFlags<'_>) -> bool {
matches.has(&flags::ICONS).unwrap_or_default()
&& !matches.has(&flags::NO_ICONS).unwrap_or_default()
}
pub fn deduce<V: Vars>(matches: &MatchedFlags<'_>, vars: &V) -> Result<Self, OptionsError> {
if ! Self::enable_icons(matches) {
if matches.has(&flags::NO_ICONS)? || !matches.has(&flags::ICONS)? {
Ok(Self::Off)
}
else if let Some(columns) = vars.get(vars::EXA_ICON_SPACING).and_then(|s| s.into_string().ok()) {

View File

@ -23,7 +23,7 @@ DISPLAY OPTIONS
--colo[u]r=WHEN when to use terminal colours (always, auto, never)
--colo[u]r-scale highlight levels of file sizes distinctly
--icons display icons
--no-icons hide icons (precedence over --icons)
--no-icons don't display icons (always overrides --icons)
FILTERING AND SORTING OPTIONS
-a, --all show hidden and 'dot' files

View File

@ -66,7 +66,7 @@ lazy_static! {
m.insert("bin", '\u{e5fc}'); // 
m.insert("config", '\u{e5fc}'); // 
m.insert("docker-compose.yml", '\u{f308}'); // 
m.insert("dockerfile", '\u{f308}'); // 
m.insert("Dockerfile", '\u{f308}'); // 
m.insert("ds_store", '\u{f179}'); // 
m.insert("gitignore_global", '\u{f1d3}'); // 
m.insert("gradle", '\u{e70e}'); // 