exa/contrib/completions.bash
Benjamin Sago 0fefc78cbb Add more modified date aliases
I don’t really see the modified date as the *modified* date, rather just the *date* field, because it’s the date field I refer to like 99.9% of the time. So now it has aliases to match.

Also are included are aliases for the reverse order, because I’d rather write “new” than “the reverse of old”.
2017-09-13 23:26:06 +01:00

43 lines
1.0 KiB
Bash

_exa()
{
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]}
case "$prev" in
-'?'|--help|-v|--version)
return
;;
-L|--level)
COMPREPLY=( $( compgen -W '{0..9}' -- "$cur" ) )
return
;;
-s|--sort)
COMPREPLY=( $( compgen -W 'name filename Name Filename size filesize extension Extension date time modified accessed created type inode oldest newest age none --' -- "$cur" ) )
return
;;
-t|--time)
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
-*)
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
;;
*)
_filedir
;;
esac
} &&
complete -o filenames -o bashdefault -F _exa exa