The following commit has been merged in the master branch:
commit 3842fc5472b994b78af9423e40473cd897de6231
Author: Ville Skyttä <[email protected]>
Date: Wed Apr 20 22:12:53 2011 +0300
Use _init_completion() in completions/k*.
diff --git a/completions/k3b b/completions/k3b
index 1b6202f..56b6c11 100644
--- a/completions/k3b
+++ b/completions/k3b
@@ -4,9 +4,8 @@ have k3b || return
_k3b()
{
- local cur prev
- _get_comp_words_by_ref cur prev
- COMPREPLY=()
+ local cur prev words cword
+ _init_completion || return
case $prev in
--help*|--author|-v|--version|--license|--lang)
diff --git a/completions/kldload b/completions/kldload
index 644e508..1fb0443 100644
--- a/completions/kldload
+++ b/completions/kldload
@@ -4,11 +4,11 @@
_kldload()
{
- local cur moddir
+ local cur prev words cword
+ _init_completion || return
- moddir=/modules/
+ local moddir=/modules/
[ -d $moddir ] || moddir=/boot/kernel/
- _get_comp_words_by_ref cur
_compopt_o_filenames
COMPREPLY=( $( compgen -f "$moddir$cur" ) )
@@ -21,8 +21,9 @@ complete -F _kldload kldload
_kldunload()
{
- local cur
- _get_comp_words_by_ref cur
+ local cur prev words cword
+ _init_completion || return
+
COMPREPLY=( $( kldstat | \
sed -ne "s/^.*[ \t]\{1,\}\($cur[a-z_]\{1,\}\).ko$/\1/p" ) )
} &&
--
bash-completion
_______________________________________________
Bash-completion-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/bash-completion-commits