Ville Skyttä c875723bef Include trailing equals sign in options that take arguments that way.
This way it's clearer to users that an argument is expected.  It's
likely that this commit does not catch all such cases, but it should
do it for most of the affected commands I have installed.
2011-05-02 11:45:55 +03:00

57 lines
1.2 KiB
Bash

# bash completion for k3b
have k3b || return
_k3b()
{
local cur prev words cword
_init_completion || return
case $prev in
--help*|--author|-v|--version|--license|--lang)
return 0
;;
--datacd|--audiocd|--videocd|--mixedcd|--emovixcd|--videodvd)
_filedir
return 0
;;
--copydvd|--formatdvd|--videodvdrip)
_dvd_devices
return 0
;;
--copycd|--erasecd|--cddarip|--videocdrip)
_cd_devices
_dvd_devices
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
if [[ "$cur" == -* ]] ; then
COMPREPLY=( $( compgen -W "$( _parse_help "$1" )" -- "$cur" ) )
[[ $COMPREPLY == *= ]] && compopt -o nospace
else
_filedir
fi
} &&
complete -F _k3b k3b
# 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