39 lines
656 B
Plaintext
Raw Normal View History

# cksfv completion by Chris <xris@forevermore.net>
2009-06-08 21:22:43 +03:00
have cksfv &&
_cksfv()
{
local cur prev
2009-10-04 19:42:50 +02:00
COMPREPLY=()
_get_comp_words_by_ref cur prev
2009-10-04 19:42:50 +02:00
if [ $COMP_CWORD -eq 1 ]; then
COMPREPLY=( $( compgen -W '-C -f -i -q -v' -- "$cur" ) )
return 0
fi
case "$prev" in
2009-12-30 00:41:15 +01:00
-C)
_filedir -d
return 0
;;
-f)
_filedir 'sfv'
return 0
;;
2009-10-04 19:42:50 +02:00
esac
2009-10-04 19:42:50 +02:00
_filedir
return 0
2009-06-08 21:22:43 +03:00
} &&
complete -F _cksfv cksfv
# Local variables:
# mode: shell-script
2009-10-04 19:42:50 +02:00
# sh-basic-offset: 4
# sh-indent-comment: t
2009-10-04 19:42:50 +02:00
# indent-tabs-mode: nil
# End:
2009-10-04 19:42:50 +02:00
# ex: ts=4 sw=4 et filetype=sh