[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-91-g22c8330

Ville Skyttä ville.skytta at iki.fi
Wed Apr 20 14:19:55 UTC 2011


The following commit has been merged in the master branch:
commit ca6f748f98fb419a41b7392daa97b1aac1d1b739
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Wed Apr 20 16:51:42 2011 +0300

    Use _init_completion() in completions/e*.

diff --git a/completions/e2fsprogs b/completions/e2fsprogs
index 50ce788..23962da 100644
--- a/completions/e2fsprogs
+++ b/completions/e2fsprogs
@@ -3,9 +3,8 @@
 have badblocks &&
 _badblocks()
 {
-    COMPREPLY=()
-    local cur prev
-    _get_comp_words_by_ref cur prev
+    local cur prev words cword
+    _init_completion || return
 
     case $prev in
         -b|-c|-e|-d|-p|-t)
@@ -33,9 +32,8 @@ complete -F _badblocks badblocks
 have dumpe2fs &&
 _dumpe2fs()
 {
-    COMPREPLY=()
-    local cur prev
-    _get_comp_words_by_ref cur prev
+    local cur prev words cword
+    _init_completion || return
 
     case $prev in
         -o|-V)
@@ -61,9 +59,8 @@ complete -F _dumpe2fs dumpe2fs
 have e2freefrag &&
 _e2freefrag()
 {
-    COMPREPLY=()
-    local cur prev
-    _get_comp_words_by_ref cur prev
+    local cur prev words cword
+    _init_completion || return
 
     case $prev in
         -c|-h)
@@ -85,9 +82,8 @@ complete -F _e2freefrag e2freefrag
 have e2label &&
 _e2label()
 {
-    COMPREPLY=()
-    local cur cword
-    _get_comp_words_by_ref cur cword
+    local cur prev words cword
+    _init_completion || return
 
     if [ $cword -eq 1 ]; then
         cur=${cur:=/dev/}
@@ -100,9 +96,8 @@ complete -F _e2label e2label
 have filefrag &&
 _filefrag()
 {
-    COMPREPLY=()
-    local cur
-    _get_comp_words_by_ref cur
+    local cur prev words cword
+    _init_completion || return
 
     if [[ "$cur" == -* ]]; then
         COMPREPLY=( $( compgen -W '-B -b -s -v -x' -- "$cur" ) )
@@ -117,9 +112,8 @@ complete -F _filefrag filefrag
 have tune2fs &&
 _tune2fs()
 {
-    COMPREPLY=()
-    local cur prev
-    _get_comp_words_by_ref cur prev
+    local cur prev words cword
+    _init_completion || return
 
     case $prev in
         -c|-C|-E|-i|-J|-L|-m|-r|-T)

-- 
bash-completion



More information about the Bash-completion-commits mailing list