Przeglądaj źródła

feat: document and change output for --git-repos

PThorpe92 2 lat temu
rodzic
commit
6c894706d4
2 zmienionych plików z 3 dodań i 3 usunięć
  1. 1 1
      man/eza.1.md
  2. 2 2
      src/output/render/git.rs

+ 1 - 1
man/eza.1.md

@@ -200,7 +200,7 @@ These options are available when running with `--long` (`-l`):
 
 This adds a two-character column indicating the staged and unstaged statuses respectively. The status character can be ‘`-`’ for not modified, ‘`M`’ for a modified file, ‘`N`’ for a new file, ‘`D`’ for deleted, ‘`R`’ for renamed, ‘`T`’ for type-change, ‘`I`’ for ignored, and ‘`U`’ for conflicted.
 
-Directories will be shown to have the status of their contents, which is how ‘deleted’ is possible: if a directory contains a file that has a certain status, it will be shown to have that status.
+Directories will be shown to have the status of their contents, which is how ‘deleted’ is possible: if a directory contains a file that has a certain status, it will be shown to have that status. Symbols shown are `|` (green) for clean, `+` (red) for dirty, and `-`(green) for unknown. 
 
 `--no-git`
 : Don't show Git status (always overrides `--git`, `--git-repos`, `--git-repos-no-status`)

+ 2 - 2
src/output/render/git.rs

@@ -31,8 +31,8 @@ impl f::SubdirGitRepo {
         let s = match self.status {
             f::SubdirGitRepoStatus::NoRepo => style.paint("- "),
             f::SubdirGitRepoStatus::GitClean => style.fg(Color::Green).paint("| "),
-            f::SubdirGitRepoStatus::GitDirty => style.bold().fg(Color::Red).paint("- "),
-            f::SubdirGitRepoStatus::GitUnknown => style.paint("- "),
+            f::SubdirGitRepoStatus::GitDirty => style.bold().fg(Color::Red).paint("+ "),
+            f::SubdirGitRepoStatus::GitUnknown => style.fg(Color::Green).bold().paint("- "),
         };
 
         TextCell {