Skip to content

Commit 798a28e

Browse files
authored
eza: add newer flags and examples (#1145)
1 parent c8c912c commit 798a28e

File tree

1 file changed

+36
-12
lines changed

1 file changed

+36
-12
lines changed

custom-completions/eza/eza-completions.nu

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
# eza v0.23.0
2+
13
def "nu-complete eza when" [] {
24
[[value]; ["always"] ["auto"] ["never"]]
35
}
46

57
def "nu-complete eza sort-field" [] {
68
# name, Name, size, extension, Extension, modified, changed, accessed, created, inode, type, none
7-
[[value]; ["name"] ["Name"] ["extension"] ["Extension"] ["size"] ["type"] ["modified"] ["accessed"] ["created"] ["inode"] ["none"] ["date"] ["time"] ["old"] ["new"]]
9+
[[value]; ["name"] ["Name"] ["extension"] ["Extension"] ["size"] ["type"] ["modified"] ["changed"] ["accessed"] ["created"] ["inode"] ["none"] ["date"] ["time"] ["old"] ["new"]]
810
}
911

1012
def "nu-complete eza time-field" [] {
@@ -25,10 +27,25 @@ def "nu-complete eza color-scale-mode" [] {
2527
}
2628

2729
# A modern, maintained replacement for ls
30+
@category filesystem
31+
@example "List the contents of the current directory in a grid" {
32+
eza
33+
}
34+
@example "Display a list of files with the largest at the top" {
35+
eza --oneline --reverse --sort=size
36+
}
37+
@example "Display a table of files with a header, showing each file's metadata, inode, and Git status" {
38+
eza --long --header --inode --git
39+
}
40+
@example "Display a tree of files, three levels deep, as well as each file's metadata" {
41+
eza --long --tree --level=3
42+
}
2843
export extern "eza" [
29-
path?: path # folder to list
30-
--help # show list of command-line options
44+
path?: path # folder to list
45+
46+
--help(-?) # show list of command-line options
3147
--version(-v) # show version of eza
48+
3249
--oneline(-1) # display one entry per line
3350
--long(-l) # display extended file metadata as a table
3451
--grid(-G) # display entries as a grid (default)
@@ -39,26 +56,32 @@ export extern "eza" [
3956
--classify(-F): string@"nu-complete eza when"="auto" # display type indicator by file names
4057
--colour: string@"nu-complete eza when"="auto" # when to use terminal colours
4158
--color: string@"nu-complete eza when"="auto" # when to use terminal colors
42-
--colour-scale: string@"nu-complete eza color-scale"="all" # highlight levels of 'field' distinctly
43-
--color-scale: string@"nu-complete eza color-scale"="all" # highlight levels of 'field' distinctly
44-
--colour-scale-mode: string@"nu-complete eza color-scale-mode" # use gradient or fixed colors in --color-scale
45-
--color-scale-mode: string@"nu-complete eza color-scale-mode" # use gradient or fixed colors in --color-scale
59+
--colour-scale: string@"nu-complete eza color-scale"="all" # highlight levels of 'field' distinctly
60+
--color-scale: string@"nu-complete eza color-scale"="all" # highlight levels of 'field' distinctly
61+
--colour-scale-mode: string@"nu-complete eza color-scale-mode" # use gradient or fixed colors in --colour-scale
62+
--color-scale-mode: string@"nu-complete eza color-scale-mode" # use gradient or fixed colors in --color-scale
4663
--icons: string@"nu-complete eza when"="auto" # when to display icons
4764
--no-quotes # don't quote file names with spaces
4865
--hyperlink # display entries as hyperlinks
4966
--absolute # display entries with their absolute path (on, follow, off)
67+
--follow-symlinks # drill down into symbolic links that point to directories
5068
--width(-w): int # set screen width in columns
69+
5170
--all(-a) # show hidden and 'dot' files. Use this twice to also show the '.' and '..' directories
5271
--almost-all(-A) # equivalent to --all; included for compatibility with `ls -A`
53-
--list-dirs(-d) # list directories as files; don't list their contents
72+
--treat-dirs-as-files(-d) # list directories as files; don't list their contents
73+
--only-dirs(-D) # list only directories
74+
--only-files(-f) # list only files
75+
--show-symlinks # explicitly show symbolic links (for use with --only-dirs | --only-files)
76+
--no-symlinks # do not show symbolic links
5477
--level(-L): int # limit the depth of recursion
5578
--reverse(-r) # reverse the sort order
5679
--sort(-s): string@"nu-complete eza sort-field" # which field to sort by
5780
--group-directories-first # list directories before other files
58-
--only-dirs(-D) # list only directories
59-
--only-files(-f) # list only files
81+
--group-directories-last # list directories after other files
6082
--ignore-glob(-I): string # glob patterns (pipe-separated) of files to ignore
6183
--git-ignore # ignore files mentioned in '.gitignore'
84+
6285
--binary(-b) # list file sizes with binary prefixes
6386
--bytes(-B) # list file sizes in bytes, without any prefixes
6487
--group(-g) # list each file's group
@@ -77,15 +100,16 @@ export extern "eza" [
77100
--changed # use the changed timestamp field
78101
--time-style: string@"nu-complete eza time-style" # how to format timestamps (also a custom style '+<FORMAT>' like '+%Y-%m-%d %H:%M')
79102
--total-size # show the size of a directory as the size of all files and directories inside (unix only)
80-
--no-permissions # suppress the permissions field
81103
--octal-permissions(-o) # list each file's permission in octal format
104+
--no-permissions # suppress the permissions field
82105
--no-filesize # suppress the filesize field
83106
--no-user # suppress the user field
84107
--no-time # suppress the time field
85108
--stdin # read file names from stdin
86109
--git # list each file's Git status, if tracked or ignored
87110
--no-git # suppress Git status
88111
--git-repos # list root of git-tree status
112+
--git-repos-no-status # list each git-repos branch name (much faster)
89113
--extended(-@) # list each file's extended attributes and sizes
90114
--context(-Z) # list each file's security context
91-
]
115+
]

0 commit comments

Comments
 (0)