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: --ignore-submodule-contents #945

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -108,6 +108,7 @@ eza’s options are almost, but not quite, entirely unlike `ls`’s.
- **-D**, **--only-dirs**: list only directories
- **-f**, **--only-files**: list only files
- **--git-ignore**: ignore files mentioned in `.gitignore`
- **--ignore-submodule-contents**: do not list contents of submodules
PThorpe92 marked this conversation as resolved.
Show resolved Hide resolved
- **-I**, **--ignore-glob=(globs)**: glob patterns (pipe-separated) of files to ignore

Pass the `--all` option twice to also show the `.` and `..` directories.
Expand Down
1 change: 1 addition & 0 deletions completions/fish/eza.fish
Expand Up @@ -48,6 +48,7 @@ complete -c eza -l smart-group -d "Only show group if it has a different name fr
# Filtering and sorting options
complete -c eza -l group-directories-first -d "Sort directories before other files"
complete -c eza -l git-ignore -d "Ignore files mentioned in '.gitignore'"
complete -c eza -l ignore-submodule-contents -d "Do not list contents of submodules"
complete -c eza -s a -l all -d "Show hidden and 'dot' files. Use this twice to also show the '.' and '..' directories"
complete -c eza -s A -l almost-all -d "Equivalent to --all; included for compatibility with `ls -A`"
complete -c eza -s d -l list-dirs -d "List directories like regular files"
Expand Down
121 changes: 61 additions & 60 deletions completions/nush/eza.nu
@@ -1,62 +1,63 @@
export extern "eza" [
--version(-v) # Show version of eza
--help # Show list of command-line options
--oneline(-1) # Display one entry per line
--long(-l) # Display extended file metadata as a table
--grid(-G) # Display entries in a grid
--across(-x) # Sort the grid across, rather than downwards
--recurse(-R) # Recurse into directories
--tree(-T) # Recurse into directories as a tree
--dereference(-X) # Dereference symbolic links when displaying file information
--classify(-F) # Display type indicator by file names
--color # When to use terminal colours
--colour # When to use terminal colours
--color-scale # Highlight levels of file sizes distinctly
--colour-scale # Highlight levels of file sizes distinctly
--color-scale-mode # Use gradient or fixed colors in --color-scale
--colour-scale-mode # Use gradient or fixed colors in --colour-scale
--icons # When to display icons
--no-quotes # Don't quote file names with spaces
--hyperlink # Display entries as hyperlinks
--absolute # Display entries with their absolute path
--group-directories-first # Sort directories before other files
--git-ignore # Ignore files mentioned in '.gitignore'
--all(-a) # Show hidden and 'dot' files. Use this twice to also show the '.' and '..' directories
--almost-all(-A) # Equivalent to --all; included for compatibility with `ls -A`
--list-dirs(-d) # List directories like regular files
--level(-L): string # Limit the depth of recursion
--width(-w) # Limits column output of grid, 0 implies auto-width
--reverse(-r) # Reverse the sort order
--sort(-s) # Which field to sort by
--only-dirs(-D) # List only directories
--only-files(-f) # List only files
--binary(-b) # List file sizes with binary prefixes
--bytes(-B) # List file sizes in bytes, without any prefixes
--group(-g) # List each file's group
--header(-h) # Add a header row to each column
--links(-H) # List each file's number of hard links
--inode(-i) # List each file's inode number
--blocksize(-S) # List each file's size of allocated file system blocks
--time(-t) -d # Which timestamp field to list
--modified(-m) # Use the modified timestamp field
--numeric(-n) # List numeric user and group IDs.
--changed # Use the changed timestamp field
--accessed(-u) # Use the accessed timestamp field
--created(-U) # Use the created timestamp field
--time-style # How to format timestamps
--total-size # Show recursive directory size (unix only)
--no-permissions # Suppress the permissions field
--octal-permissions(-o) # List each file's permission in octal format
--no-filesize # Suppress the filesize field
--no-user # Suppress the user field
--no-time # Suppress the time field
--mounts(-M) # Show mount details
--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
--context(-Z) # List each file's security context
--smart-group # Only show group if it has a different name from owner
--stdin # When piping to eza. Read file paths from stdin
--version(-v) # Show version of eza
--help # Show list of command-line options
--oneline(-1) # Display one entry per line
--long(-l) # Display extended file metadata as a table
--grid(-G) # Display entries in a grid
--across(-x) # Sort the grid across, rather than downwards
--recurse(-R) # Recurse into directories
--tree(-T) # Recurse into directories as a tree
--dereference(-X) # Dereference symbolic links when displaying file information
--classify(-F) # Display type indicator by file names
--color # When to use terminal colours
--colour # When to use terminal colours
--color-scale # Highlight levels of file sizes distinctly
--colour-scale # Highlight levels of file sizes distinctly
--color-scale-mode # Use gradient or fixed colors in --color-scale
--colour-scale-mode # Use gradient or fixed colors in --colour-scale
--icons # When to display icons
--no-quotes # Don't quote file names with spaces
--hyperlink # Display entries as hyperlinks
--absolute # Display entries with their absolute path
--group-directories-first # Sort directories before other files
--git-ignore # Ignore files mentioned in '.gitignore'
--ignore-submodule-contents # Do not list contents of submodules
--all(-a) # Show hidden and 'dot' files. Use this twice to also show the '.' and '..' directories
--almost-all(-A) # Equivalent to --all; included for compatibility with `ls -A`
--list-dirs(-d) # List directories like regular files
--level(-L): string # Limit the depth of recursion
--width(-w) # Limits column output of grid, 0 implies auto-width
--reverse(-r) # Reverse the sort order
--sort(-s) # Which field to sort by
--only-dirs(-D) # List only directories
--only-files(-f) # List only files
--binary(-b) # List file sizes with binary prefixes
--bytes(-B) # List file sizes in bytes, without any prefixes
--group(-g) # List each file's group
--header(-h) # Add a header row to each column
--links(-H) # List each file's number of hard links
--inode(-i) # List each file's inode number
--blocksize(-S) # List each file's size of allocated file system blocks
--time(-t) -d # Which timestamp field to list
--modified(-m) # Use the modified timestamp field
--numeric(-n) # List numeric user and group IDs.
--changed # Use the changed timestamp field
--accessed(-u) # Use the accessed timestamp field
--created(-U) # Use the created timestamp field
--time-style # How to format timestamps
--total-size # Show recursive directory size (unix only)
--no-permissions # Suppress the permissions field
--octal-permissions(-o) # List each file's permission in octal format
--no-filesize # Suppress the filesize field
--no-user # Suppress the user field
--no-time # Suppress the time field
--mounts(-M) # Show mount details
--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
--context(-Z) # List each file's security context
--smart-group # Only show group if it has a different name from owner
--stdin # When piping to eza. Read file paths from stdin
]
1 change: 1 addition & 0 deletions completions/zsh/_eza
Expand Up @@ -29,6 +29,7 @@ __eza() {
--absolute"[Display entries with their absolute path]:(mode):(on follow off)" \
--group-directories-first"[Sort directories before other files]" \
--git-ignore"[Ignore files mentioned in '.gitignore']" \
--ignore-submodule-contents"[Do not list contents of submodules]" \
{-a,--all}"[Show hidden and 'dot' files. Use this twice to also show the '.' and '..' directories]" \
{-A,--almost-all}"[Equivalent to --all; included for compatibility with \'ls -A\']" \
{-d,--list-dirs}"[List directories like regular files]" \
Expand Down
19 changes: 19 additions & 0 deletions devtools/dir-generator.sh
Expand Up @@ -133,6 +133,25 @@ touch icons/man.1 --date=@0
touch icons/marked.md --date=@0
# END test_icons

# BEGIN submodule
cd git/*01 || exit
git add "*01"
# git doesn't allow us to create a submodule without a branch
GIT_COMMITTER_NAME="Your Name" GIT_COMMITTER_EMAIL="your@email.com" git commit --author="Your Name <your@email.com>" -m "Initial commit"
cd .. || exit

mkdir -p with_submodule
cd with_submodule || exit
git init
seq 01 10 | split -l 1 -a 3 -d - file_
git -c protocol.file.allow=always submodule add ../*01
touch --date=@0 ./*;
touch --date=@0 ./*01/*;
cd .. || exit
ln -s with_submodule with_submodule_symlink
cd .. || exit
# END submodule

# BEGIN set date
touch --date=@0 ./*;
# END set date
3 changes: 3 additions & 0 deletions man/eza.1.md
Expand Up @@ -157,6 +157,9 @@ Sort fields starting with a capital letter will sort uppercase before lowercase:
`--git-ignore` [if eza was built with git support]
: Do not list files that are ignored by Git.

`--ignore-submodule-contents` [if eza was built with git support]
: Do not list contents of submodules.

`--group-directories-first`
: List directories before other files.

Expand Down
2 changes: 2 additions & 0 deletions powertest.yaml
Expand Up @@ -143,6 +143,8 @@ commands:
- "*.toml"
? - null
- --git-ignore
? - null
- --ignore-submodule-contents

# Long View Options
? - -b
Expand Down