mirror of
https://github.com/eza-community/eza
synced 2024-10-14 20:03:50 +00:00
commit
511b2291fd
|
@ -179,6 +179,7 @@ These options are available when running with `--long` (`-l`):
|
|||
- **-@**, **--extended**: list each file’s extended attributes and sizes
|
||||
- **--changed**: use the changed timestamp field
|
||||
- **--git**: list each file’s Git status, if tracked or ignored
|
||||
- **--no-git**: suppress Git status (always overrides `--git`, `--git-repos`, `--git-repos-no-status`)
|
||||
- **--time-style**: how to format timestamps
|
||||
- **--no-permissions**: suppress the permissions field
|
||||
- **-o**, **--octal-permissions**: list each file's permission in octal format
|
||||
|
|
|
@ -92,6 +92,7 @@ complete -c eza -l no-time -d "Suppress the time field"
|
|||
|
||||
# Optional extras
|
||||
complete -c eza -l git -d "List each file's Git status, if tracked"
|
||||
complete -c eza -l no-git -d "Suppress Git status"
|
||||
complete -c eza -l git-repos -d "List each git-repos status and branch name"
|
||||
complete -c eza -l git-repos-no-status -d "List each git-repos branch name (much faster)"
|
||||
complete -c eza -s '@' -l extended -d "List each file's extended attributes and sizes"
|
||||
|
|
|
@ -55,6 +55,7 @@ __eza() {
|
|||
{-U,--created}"[Use the created timestamp field]" \
|
||||
{-X,--dereference}"[dereference symlinks for file information]" \
|
||||
--git"[List each file's Git status, if tracked]" \
|
||||
--no-git"[Suppress Git status]" \
|
||||
--git-repos"[List each git-repos status and branch name]" \
|
||||
--git-repos-no-status"[List each git-repos branch name (much faster)]" \
|
||||
{-@,--extended}"[List each file's extended attributes and sizes]" \
|
||||
|
|
|
@ -199,6 +199,9 @@ This adds a two-character column indicating the staged and unstaged statuses res
|
|||
|
||||
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`)
|
||||
|
||||
|
||||
ENVIRONMENT VARIABLES
|
||||
=====================
|
||||
|
|
|
@ -67,6 +67,7 @@ pub static NO_ICONS: Arg = Arg { short: None, long: "no-icons", takes_value: Tak
|
|||
|
||||
// optional feature options
|
||||
pub static GIT: Arg = Arg { short: None, long: "git", takes_value: TakesValue::Forbidden };
|
||||
pub static NO_GIT: Arg = Arg { short: None, long: "no-git", takes_value: TakesValue::Forbidden };
|
||||
pub static GIT_REPOS: Arg = Arg { short: None, long: "git-repos", takes_value: TakesValue::Forbidden };
|
||||
pub static GIT_REPOS_NO_STAT: Arg = Arg { short: None, long: "git-repos-no-status", takes_value: TakesValue::Forbidden };
|
||||
pub static EXTENDED: Arg = Arg { short: Some(b'@'), long: "extended", takes_value: TakesValue::Forbidden };
|
||||
|
@ -87,5 +88,6 @@ pub static ALL_ARGS: Args = Args(&[
|
|||
&BLOCKSIZE, &TIME, &ACCESSED, &CREATED, &TIME_STYLE, &HYPERLINK,
|
||||
&NO_PERMISSIONS, &NO_FILESIZE, &NO_USER, &NO_TIME, &NO_ICONS,
|
||||
|
||||
&GIT, &GIT_REPOS, &GIT_REPOS_NO_STAT, &EXTENDED, &OCTAL, &SECURITY_CONTEXT
|
||||
&GIT, &NO_GIT, &GIT_REPOS, &GIT_REPOS_NO_STAT,
|
||||
&EXTENDED, &OCTAL, &SECURITY_CONTEXT
|
||||
]);
|
||||
|
|
|
@ -67,6 +67,7 @@ static GIT_FILTER_HELP: &str = " \
|
|||
--git-ignore ignore files mentioned in '.gitignore'";
|
||||
static GIT_VIEW_HELP: &str = " \
|
||||
--git list each file's Git status, if tracked or ignored
|
||||
--no-git suppress Git status (always overrides --git, --git-repos, --git-repos-no-status)
|
||||
--git-repos list root of git-tree status";
|
||||
static EXTENDED_HELP: &str = " \
|
||||
-@, --extended list each file's extended attributes and sizes";
|
||||
|
|
|
@ -88,7 +88,7 @@ impl Mode {
|
|||
}
|
||||
}
|
||||
|
||||
if matches.has(&flags::GIT)? {
|
||||
if matches.has(&flags::GIT)? && !matches.has(&flags::NO_GIT)? {
|
||||
return Err(OptionsError::Useless(&flags::GIT, false, &flags::LONG));
|
||||
}
|
||||
else if matches.has(&flags::LEVEL)? && ! matches.has(&flags::RECURSE)? && ! matches.has(&flags::TREE)? {
|
||||
|
@ -219,9 +219,9 @@ impl Columns {
|
|||
fn deduce(matches: &MatchedFlags<'_>) -> Result<Self, OptionsError> {
|
||||
let time_types = TimeTypes::deduce(matches)?;
|
||||
|
||||
let git = matches.has(&flags::GIT)?;
|
||||
let subdir_git_repos = matches.has(&flags::GIT_REPOS)?;
|
||||
let subdir_git_repos_no_stat = !subdir_git_repos && matches.has(&flags::GIT_REPOS_NO_STAT)?;
|
||||
let git = matches.has(&flags::GIT)? && !matches.has(&flags::NO_GIT)?;
|
||||
let subdir_git_repos = matches.has(&flags::GIT_REPOS)? && !matches.has(&flags::NO_GIT)?;
|
||||
let subdir_git_repos_no_stat = !subdir_git_repos && matches.has(&flags::GIT_REPOS_NO_STAT)? && !matches.has(&flags::NO_GIT)?;
|
||||
|
||||
let blocksize = matches.has(&flags::BLOCKSIZE)?;
|
||||
let group = matches.has(&flags::GROUP)?;
|
||||
|
|
|
@ -53,4 +53,5 @@ LONG VIEW OPTIONS
|
|||
--no-user suppress the user field
|
||||
--no-time suppress the time field
|
||||
--git list each file's Git status, if tracked or ignored
|
||||
--no-git suppress Git status (always overrides --git, --git-repos, --git-repos-no-status)
|
||||
-@, --extended list each file's extended attributes and sizes
|
||||
|
|
Loading…
Reference in a new issue