2017-05-06 20:56:40 +00:00
|
|
|
_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)
|
2017-06-29 13:57:43 +00:00
|
|
|
COMPREPLY=( $( compgen -W 'name filename Name Filename size filesize extension Extension modified accessed created type inode none --' -- "$cur" ) )
|
2017-05-06 20:56:40 +00:00
|
|
|
return
|
|
|
|
;;
|
|
|
|
|
|
|
|
-t|--time)
|
|
|
|
COMPREPLY=( $( compgen -W 'accessed modified created --' -- $cur ) )
|
|
|
|
return
|
|
|
|
;;
|
2017-07-05 23:52:27 +00:00
|
|
|
|
|
|
|
--time-style)
|
|
|
|
COMPREPLY=( $( compgen -W 'default iso long-iso full-iso --' -- $cur ) )
|
|
|
|
return
|
|
|
|
;;
|
2017-05-06 20:56:40 +00:00
|
|
|
esac
|
|
|
|
|
|
|
|
case "$cur" in
|
|
|
|
-*)
|
|
|
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
_filedir
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
} &&
|
|
|
|
complete -o filenames -o bashdefault -F _exa exa
|