Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 7 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions man/eza.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
Expand Down
4 changes: 2 additions & 2 deletions src/output/render/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading