_eza 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #compdef eza
  2. # Save this file as _eza in /usr/local/share/zsh/site-functions or in any
  3. # other folder in $fpath. E.g. save it in a folder called ~/.zfunc and add a
  4. # line containing `fpath=(~/.zfunc $fpath)` somewhere before `compinit` in your
  5. # ~/.zshrc.
  6. __eza() {
  7. # Give completions using the `_arguments` utility function with
  8. # `-s` for option stacking like `eza -ab` for `eza -a -b` and
  9. # `-S` for delimiting options with `--` like in `eza -- -a`.
  10. _arguments -s -S \
  11. "(- *)"{-v,--version}"[Show version of eza]" \
  12. "(- *)"{-'\?',--help}"[Show list of command-line options]" \
  13. {-1,--oneline}"[Display one entry per line]" \
  14. {-l,--long}"[Display extended file metadata as a table]" \
  15. {-G,--grid}"[Display entries as a grid]" \
  16. {-x,--across}"[Sort the grid across, rather than downwards]" \
  17. {-R,--recurse}"[Recurse into directories]" \
  18. {-T,--tree}"[Recurse into directories as a tree]" \
  19. {-F,--classify}"[Display type indicator by file names]" \
  20. --colo{,u}r="[When to use terminal colours]:(when):(always auto never)" \
  21. --colo{,u}r-scale"[Highlight levels of file sizes distinctly]" \
  22. --icons"[Display icons]" \
  23. --no-icons"[Hide icons]" \
  24. --hyperlink"[Display entries as hyperlinks]" \
  25. --group-directories-first"[Sort directories before other files]" \
  26. --git-ignore"[Ignore files mentioned in '.gitignore']" \
  27. {-a,--all}"[Show hidden and 'dot' files]" \
  28. {-d,--list-dirs}"[List directories like regular files]" \
  29. {-D,--only-dirs}"[List only directories]" \
  30. {-L,--level}"+[Limit the depth of recursion]" \
  31. {-w,--width}"+[Limits column output of grid, 0 implies auto-width]" \
  32. {-r,--reverse}"[Reverse the sort order]" \
  33. {-s,--sort}="[Which field to sort by]:(sort field):(accessed age changed created date extension Extension filename Filename inode modified oldest name Name newest none size time type)" \
  34. {-I,--ignore-glob}"[Ignore files that match these glob patterns]" \
  35. {-b,--binary}"[List file sizes with binary prefixes]" \
  36. {-B,--bytes}"[List file sizes in bytes, without any prefixes]" \
  37. --changed"[Use the changed timestamp field]" \
  38. {-g,--group}"[List each file's group]" \
  39. {-h,--header}"[Add a header row to each column]" \
  40. {-H,--links}"[List each file's number of hard links]" \
  41. {-i,--inode}"[List each file's inode number]" \
  42. {-m,--modified}"[Use the modified timestamp field]" \
  43. {-n,--numeric}"[List numeric user and group IDs.]" \
  44. {-S,--blocksize}"[List each file's size of allocated file system blocks.]" \
  45. {-t,--time}="[Which time field to show]:(time field):(accessed changed created modified)" \
  46. --time-style="[How to format timestamps]:(time style):(default iso long-iso full-iso relative)" \
  47. --no-permissions"[Suppress the permissions field]" \
  48. {-o,--octal-permissions}"[List each file's permission in octal format]" \
  49. --no-filesize"[Suppress the filesize field]" \
  50. --no-user"[Suppress the user field]" \
  51. --no-time"[Suppress the time field]" \
  52. {-u,--accessed}"[Use the accessed timestamp field]" \
  53. {-U,--created}"[Use the created timestamp field]" \
  54. {-X,--dereference}"[dereference symlinks for file information]" \
  55. --git"[List each file's Git status, if tracked]" \
  56. --git-repos"[List each git-repos status and branch name]" \
  57. --git-repos-no-status"[List each git-repos branch name (much faster)]" \
  58. {-@,--extended}"[List each file's extended attributes and sizes]" \
  59. {-Z,--context}"[List each file's security context]" \
  60. '*:filename:_files'
  61. }
  62. __eza