From 247ada3cc419ab140d01341ae8be87268aad739f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Tue, 15 Dec 2009 23:16:31 +0200 Subject: [PATCH] Make k3b option vs filename completion work more like others. --- contrib/k3b | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/contrib/k3b b/contrib/k3b index 5c6269f4..692036d1 100644 --- a/contrib/k3b +++ b/contrib/k3b @@ -37,8 +37,11 @@ _k3b() ;; esac - _filedir - _longopt k3b + if [[ "$cur" == -* ]] ; then + COMPREPLY=( $( compgen -W "$( _parse_help "$1" )" -- "$cur" ) ) + else + _filedir + fi } && complete -F _k3b -o filenames k3b