mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-25 13:27:33 +00:00
Document --time-style, and completions
This commit is contained in:
parent
3251378e91
commit
6afde85e18
@ -51,10 +51,12 @@ These options are available when running with --long (`-l`):
|
||||
- **-U**, **--created**: use the created timestamp field
|
||||
- **-@**, **--extended**: list each file's extended attributes and sizes
|
||||
- **--git**: list each file's Git status, if tracked
|
||||
- **--time-style**: how to format timestamps
|
||||
|
||||
- Valid **--color** options are **always**, **automatic**, and **never**.
|
||||
- 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 styles are **default**, **iso**, **long-iso**, and **full-iso**.
|
||||
|
||||
|
||||
## Installation
|
||||
|
@ -22,6 +22,11 @@ _exa()
|
||||
COMPREPLY=( $( compgen -W 'accessed modified created --' -- $cur ) )
|
||||
return
|
||||
;;
|
||||
|
||||
--time-style)
|
||||
COMPREPLY=( $( compgen -W 'default iso long-iso full-iso --' -- $cur ) )
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$cur" in
|
||||
|
@ -55,8 +55,14 @@ complete -c exa -s 't' -l 'time' -x -d "Which timestamp field to list" -a "
|
||||
created\t'Display created time'
|
||||
modified\t'Display modified time'
|
||||
"
|
||||
complete -c exa -s 'u' -l 'accessed' -d "Use the accessed timestamp field"
|
||||
complete -c exa -s 'U' -l 'created' -d "Use the created timestamp field"
|
||||
complete -c exa -s 'u' -l 'accessed' -d "Use the accessed timestamp field"
|
||||
complete -c exa -s 'U' -l 'created' -d "Use the created timestamp field"
|
||||
complete -c exa -l 'time-style' -x -d "How to format timestamps" -a "
|
||||
default\t'Use the default time style'
|
||||
iso\t'Display brief ISO timestamps'
|
||||
long-iso\t'Display longer ISO timestaps, up to the minute'
|
||||
full-iso\t'Display full ISO timestamps, up to the nanosecond'
|
||||
"
|
||||
|
||||
# Optional extras
|
||||
complete -c exa -s 'g' -l 'git' -d "List each file's Git status, if tracked"
|
||||
|
@ -29,6 +29,7 @@ __exa() {
|
||||
{-m,--modified}"[Use the modified timestamp field]" \
|
||||
{-S,--blocks}"[List each file's number of filesystem blocks]" \
|
||||
{-t,--time}"[Which time field to show]:(time field):(accessed created modified)" \
|
||||
--time-style"[How to format timestamps]:(time style):(default iso long-iso full-iso)" \
|
||||
{-u,--accessed}"[Use the accessed timestamp field]" \
|
||||
{-U,--created}"[Use the created timestamp field]" \
|
||||
--git"[List each file's Git status, if tracked]" \
|
||||
|
@ -145,6 +145,11 @@ which timestamp field to list (modified, accessed, created)
|
||||
.RS
|
||||
.RE
|
||||
.TP
|
||||
.B \-\-time\-style=\f[I]STYLE\f[]
|
||||
how to format timestamps (default, iso, long-iso, full-iso)
|
||||
.RS
|
||||
.RE
|
||||
.TP
|
||||
.B \-u, \-\-accessed
|
||||
use the accessed timestamp field
|
||||
.RS
|
||||
|
@ -40,7 +40,8 @@ LONG VIEW OPTIONS
|
||||
-S, --blocks show number of file system blocks
|
||||
-t, --time FIELD which timestamp field to list (modified, accessed, created)
|
||||
-u, --accessed use the accessed timestamp field
|
||||
-U, --created use the created timestamp field"##;
|
||||
-U, --created use the created timestamp field
|
||||
--time-style how to format timestamps (default, iso, long-iso, full-iso)"##;
|
||||
|
||||
static GIT_HELP: &str = r##" --git list each file's Git status, if tracked"##;
|
||||
static EXTENDED_HELP: &str = r##" -@, --extended list each file's extended attributes and sizes"##;
|
||||
|
@ -38,5 +38,6 @@ LONG VIEW OPTIONS
|
||||
-t, --time FIELD which timestamp field to list (modified, accessed, created)
|
||||
-u, --accessed use the accessed timestamp field
|
||||
-U, --created use the created timestamp field
|
||||
--time-style how to format timestamps (default, iso, long-iso, full-iso)
|
||||
--git list each file's Git status, if tracked
|
||||
-@, --extended list each file's extended attributes and sizes
|
||||
|
@ -14,5 +14,6 @@ LONG VIEW OPTIONS
|
||||
-t, --time FIELD which timestamp field to list (modified, accessed, created)
|
||||
-u, --accessed use the accessed timestamp field
|
||||
-U, --created use the created timestamp field
|
||||
--time-style how to format timestamps (default, iso, long-iso, full-iso)
|
||||
--git list each file's Git status, if tracked
|
||||
-@, --extended list each file's extended attributes and sizes
|
||||
|
Loading…
Reference in New Issue
Block a user