Przeglądaj źródła

Merge pull request #283 from eza-community/p-git_repos

feat: document and change output for --git-repos
Preston Thorpe 2 lat temu
rodzic
commit
58b5472084
2 zmienionych plików z 5 dodań i 5 usunięć
  1. 3 3
      man/eza.1.md
  2. 2 2
      src/output/render/git.rs

+ 3 - 3
man/eza.1.md

@@ -197,16 +197,16 @@ These options are available when running with `--long` (`-l`):
 
 `--git`  [if eza was built with git support]
 : List each file’s Git status, if tracked.
+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.  
 
 `--git-repos` [if eza was built with git support]
 : List each directory’s Git status, if tracked.
+Symbols shown are `|`= clean, `+`= dirty, and `~`= for unknown.
 
 `--git-repos-no-status` [if eza was built with git support]
 : List if a directory is a Git repository, but not its status.
+All Git repository directories will be shown as (themed) `-` without status indicated.
 
-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.
 
 `--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 {