Use _init_completion() in completions/e*.

This commit is contained in:
Ville Skyttä 2011-04-20 16:51:42 +03:00
parent 4bc5f90b3e
commit ca6f748f98

View File

@ -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)