2009-11-03 22:24:41 +02:00
|
|
|
# bash completion for k3b
|
|
|
|
|
2011-04-05 00:35:51 +03:00
|
|
|
have k3b || return
|
|
|
|
|
2009-11-03 22:24:41 +02:00
|
|
|
_k3b()
|
|
|
|
{
|
2011-04-20 22:12:53 +03:00
|
|
|
local cur prev words cword
|
|
|
|
_init_completion || return
|
2009-11-03 22:24:41 +02:00
|
|
|
|
2009-12-30 00:39:59 +01:00
|
|
|
case $prev in
|
2009-11-03 22:24:41 +02:00
|
|
|
--help*|--author|-v|--version|--license|--lang)
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
--datacd|--audiocd|--videocd|--mixedcd|--emovixcd|--videodvd)
|
|
|
|
_filedir
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
--copydvd|--formatdvd|--videodvdrip)
|
2009-11-04 23:12:44 +02:00
|
|
|
_dvd_devices
|
2009-11-03 22:24:41 +02:00
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
--copycd|--erasecd|--cddarip|--videocdrip)
|
2009-11-04 23:12:44 +02:00
|
|
|
_cd_devices
|
|
|
|
_dvd_devices
|
2009-11-03 22:24:41 +02:00
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
--cdimage|--image)
|
|
|
|
_filedir @(cue|iso|toc)
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
--dvdimage)
|
|
|
|
_filedir iso
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
--ao)
|
|
|
|
COMPREPLY=( $( compgen -W 'alsa arts' -- "$cur" ) )
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2009-12-15 23:16:31 +02:00
|
|
|
if [[ "$cur" == -* ]] ; then
|
|
|
|
COMPREPLY=( $( compgen -W "$( _parse_help "$1" )" -- "$cur" ) )
|
2011-05-02 11:41:52 +03:00
|
|
|
[[ $COMPREPLY == *= ]] && compopt -o nospace
|
2009-12-15 23:16:31 +02:00
|
|
|
else
|
|
|
|
_filedir
|
|
|
|
fi
|
2009-11-03 22:24:41 +02:00
|
|
|
} &&
|
2010-11-01 19:26:53 +02:00
|
|
|
complete -F _k3b k3b
|
2009-11-03 22:24:41 +02:00
|
|
|
|
|
|
|
# Local variables:
|
|
|
|
# mode: shell-script
|
|
|
|
# sh-basic-offset: 4
|
|
|
|
# sh-indent-comment: t
|
|
|
|
# indent-tabs-mode: nil
|
|
|
|
# End:
|
|
|
|
# ex: ts=4 sw=4 et filetype=sh
|