From ca29c5ea3e33fd4088a5792fa0100777c642f189 Mon Sep 17 00:00:00 2001 From: Juhan280 Date: Sat, 19 Jul 2025 02:14:21 +0600 Subject: [PATCH 1/2] feat(eza-completions): add newer flags --- custom-completions/eza/eza-completions.nu | 35 +++++++++++++++-------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/custom-completions/eza/eza-completions.nu b/custom-completions/eza/eza-completions.nu index 27876fa13..650a29af9 100644 --- a/custom-completions/eza/eza-completions.nu +++ b/custom-completions/eza/eza-completions.nu @@ -1,10 +1,12 @@ +# eza v0.23.0 + def "nu-complete eza when" [] { [[value]; ["always"] ["auto"] ["never"]] } def "nu-complete eza sort-field" [] { # name, Name, size, extension, Extension, modified, changed, accessed, created, inode, type, none - [[value]; ["name"] ["Name"] ["extension"] ["Extension"] ["size"] ["type"] ["modified"] ["accessed"] ["created"] ["inode"] ["none"] ["date"] ["time"] ["old"] ["new"]] + [[value]; ["name"] ["Name"] ["extension"] ["Extension"] ["size"] ["type"] ["modified"] ["changed"] ["accessed"] ["created"] ["inode"] ["none"] ["date"] ["time"] ["old"] ["new"]] } def "nu-complete eza time-field" [] { @@ -26,9 +28,11 @@ def "nu-complete eza color-scale-mode" [] { # A modern, maintained replacement for ls export extern "eza" [ - path?: path # folder to list - --help # show list of command-line options + path?: path # folder to list + + --help(-?) # show list of command-line options --version(-v) # show version of eza + --oneline(-1) # display one entry per line --long(-l) # display extended file metadata as a table --grid(-G) # display entries as a grid (default) @@ -39,26 +43,32 @@ export extern "eza" [ --classify(-F): string@"nu-complete eza when"="auto" # display type indicator by file names --colour: string@"nu-complete eza when"="auto" # when to use terminal colours --color: string@"nu-complete eza when"="auto" # when to use terminal colors - --colour-scale: string@"nu-complete eza color-scale"="all" # highlight levels of 'field' distinctly - --color-scale: string@"nu-complete eza color-scale"="all" # highlight levels of 'field' distinctly - --colour-scale-mode: string@"nu-complete eza color-scale-mode" # use gradient or fixed colors in --color-scale - --color-scale-mode: string@"nu-complete eza color-scale-mode" # use gradient or fixed colors in --color-scale + --colour-scale: string@"nu-complete eza color-scale"="all" # highlight levels of 'field' distinctly + --color-scale: string@"nu-complete eza color-scale"="all" # highlight levels of 'field' distinctly + --colour-scale-mode: string@"nu-complete eza color-scale-mode" # use gradient or fixed colors in --colour-scale + --color-scale-mode: string@"nu-complete eza color-scale-mode" # use gradient or fixed colors in --color-scale --icons: string@"nu-complete eza when"="auto" # 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 (on, follow, off) + --follow-symlinks # drill down into symbolic links that point to directories --width(-w): int # set screen width in columns + --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 as files; don't list their contents + --treat-dirs-as-files(-d) # list directories as files; don't list their contents + --only-dirs(-D) # list only directories + --only-files(-f) # list only files + --show-symlinks # explicitly show symbolic links (for use with --only-dirs | --only-files) + --no-symlinks # do not show symbolic links --level(-L): int # limit the depth of recursion --reverse(-r) # reverse the sort order --sort(-s): string@"nu-complete eza sort-field" # which field to sort by --group-directories-first # list directories before other files - --only-dirs(-D) # list only directories - --only-files(-f) # list only files + --group-directories-last # list directories after other files --ignore-glob(-I): string # glob patterns (pipe-separated) of files to ignore --git-ignore # ignore files mentioned in '.gitignore' + --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 @@ -77,8 +87,8 @@ export extern "eza" [ --changed # use the changed timestamp field --time-style: string@"nu-complete eza time-style" # how to format timestamps (also a custom style '+' like '+%Y-%m-%d %H:%M') --total-size # show the size of a directory as the size of all files and directories inside (unix only) - --no-permissions # suppress the permissions field --octal-permissions(-o) # list each file's permission in octal format + --no-permissions # suppress the permissions field --no-filesize # suppress the filesize field --no-user # suppress the user field --no-time # suppress the time field @@ -86,6 +96,7 @@ export extern "eza" [ --git # list each file's Git status, if tracked or ignored --no-git # suppress Git status --git-repos # list root of git-tree status + --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 -] \ No newline at end of file +] From ca6616e7ae714ac9429c1aef2fe6e1f7fcc4340a Mon Sep 17 00:00:00 2001 From: Juhan280 Date: Sat, 19 Jul 2025 03:06:22 +0600 Subject: [PATCH 2/2] feat(eza): add category and example --- custom-completions/eza/eza-completions.nu | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/custom-completions/eza/eza-completions.nu b/custom-completions/eza/eza-completions.nu index 650a29af9..9b48c4585 100644 --- a/custom-completions/eza/eza-completions.nu +++ b/custom-completions/eza/eza-completions.nu @@ -27,6 +27,19 @@ def "nu-complete eza color-scale-mode" [] { } # A modern, maintained replacement for ls +@category filesystem +@example "List the contents of the current directory in a grid" { + eza +} +@example "Display a list of files with the largest at the top" { + eza --oneline --reverse --sort=size +} +@example "Display a table of files with a header, showing each file's metadata, inode, and Git status" { + eza --long --header --inode --git +} +@example "Display a tree of files, three levels deep, as well as each file's metadata" { + eza --long --tree --level=3 +} export extern "eza" [ path?: path # folder to list