Document sorting by type

This commit is contained in:
Benjamin Sago 2017-06-29 14:57:43 +01:00
parent f750536420
commit f61e3853c1
7 changed files with 7 additions and 6 deletions

View File

@ -53,7 +53,7 @@ These options are available when running with --long (`-l`):
- **--git**: list each file's Git status, if tracked - **--git**: list each file's Git status, if tracked
- Valid **--color** options are **always**, **automatic**, and **never**. - Valid **--color** options are **always**, **automatic**, and **never**.
- Valid sort fields are **accessed**, **created**, **extension**, **Extension**, **inode**, **modified**, **name**, **Name**, **size**, and **none**. Fields starting with a capital letter are case-sensitive. - Valid sort fields are **accessed**, **created**, **extension**, **Extension**, **inode**, **modified**, **name**, **Name**, **size**, **type**, and **none**. Fields starting with a capital letter are case-sensitive.
- Valid time fields are **modified**, **accessed**, and **created**. - Valid time fields are **modified**, **accessed**, and **created**.

View File

@ -14,7 +14,7 @@ _exa()
;; ;;
-s|--sort) -s|--sort)
COMPREPLY=( $( compgen -W 'name filename Name Filename size filesize extension Extension modified accessed created none inode --' -- "$cur" ) ) COMPREPLY=( $( compgen -W 'name filename Name Filename size filesize extension Extension modified accessed created type inode none --' -- "$cur" ) )
return return
;; ;;

View File

@ -36,6 +36,7 @@ complete -c exa -s 's' -l 'sort' -x -d "Which field to sort by" -a "
Name\t'Sort by filename (case-insensitive)' Name\t'Sort by filename (case-insensitive)'
none\t'Do not sort files at all' none\t'Do not sort files at all'
size\t'Sort by file size' size\t'Sort by file size'
type\t'Sort by file type'
" "
complete -c exa -s 'I' -l 'ignore-glob' -d "Ignore files that match these glob patterns" -r complete -c exa -s 'I' -l 'ignore-glob' -d "Ignore files that match these glob patterns" -r

View File

@ -18,7 +18,7 @@ __exa() {
{-d,--list-dirs}"[List directories like regular files]" \ {-d,--list-dirs}"[List directories like regular files]" \
{-L,--level}"+[Limit the depth of recursion]" \ {-L,--level}"+[Limit the depth of recursion]" \
{-r,--reverse}"[Reverse the sort order]" \ {-r,--reverse}"[Reverse the sort order]" \
{-s,--sort}"[Which field to sort by]:(sort field):(accessed created extension Extension filename Filename inode modified name Name none size)" \ {-s,--sort}"[Which field to sort by]:(sort field):(accessed created extension Extension filename Filename inode modified name Name none size type)" \
{-I,--ignore-glob}"[Ignore files that match these glob patterns]" \ {-I,--ignore-glob}"[Ignore files that match these glob patterns]" \
{-b,--binary}"[List file sizes with binary prefixes]" \ {-b,--binary}"[List file sizes with binary prefixes]" \
{-B,--bytes}"[List file sizes in bytes, without any prefixes]" \ {-B,--bytes}"[List file sizes in bytes, without any prefixes]" \

View File

@ -76,7 +76,7 @@ reverse the sort order
.TP .TP
.B \-s, \-\-sort=\f[I]SORT_FIELD\f[] .B \-s, \-\-sort=\f[I]SORT_FIELD\f[]
which field to sort by. which field to sort by.
Valid fields are name, Name, extension, Extension, size, modified, accessed, created, inode, and none. Valid fields are name, Name, extension, Extension, size, modified, accessed, created, inode, type, and none.
Fields starting with a capital letter are case-sensitive. Fields starting with a capital letter are case-sensitive.
.RS .RS
.RE .RE

View File

@ -23,7 +23,7 @@ FILTERING AND SORTING OPTIONS
-s, --sort SORT_FIELD which field to sort by: -s, --sort SORT_FIELD which field to sort by:
--group-directories-first list directories before other files --group-directories-first list directories before other files
-I, --ignore-glob GLOBS glob patterns (pipe-separated) of files to ignore -I, --ignore-glob GLOBS glob patterns (pipe-separated) of files to ignore
Valid sort fields: name, Name, extension, Extension, size, Valid sort fields: name, Name, extension, Extension, size, type,
modified, accessed, created, inode, none modified, accessed, created, inode, none
"##; "##;

View File

@ -22,7 +22,7 @@ FILTERING AND SORTING OPTIONS
-s, --sort SORT_FIELD which field to sort by: -s, --sort SORT_FIELD which field to sort by:
--group-directories-first list directories before other files --group-directories-first list directories before other files
-I, --ignore-glob GLOBS glob patterns (pipe-separated) of files to ignore -I, --ignore-glob GLOBS glob patterns (pipe-separated) of files to ignore
Valid sort fields: name, Name, extension, Extension, size, Valid sort fields: name, Name, extension, Extension, size, type,
modified, accessed, created, inode, none modified, accessed, created, inode, none
LONG VIEW OPTIONS LONG VIEW OPTIONS