Use _init_completion() in completions/e*.
This commit is contained in:
parent
4bc5f90b3e
commit
ca6f748f98
@ -3,9 +3,8 @@
|
|||||||
have badblocks &&
|
have badblocks &&
|
||||||
_badblocks()
|
_badblocks()
|
||||||
{
|
{
|
||||||
COMPREPLY=()
|
local cur prev words cword
|
||||||
local cur prev
|
_init_completion || return
|
||||||
_get_comp_words_by_ref cur prev
|
|
||||||
|
|
||||||
case $prev in
|
case $prev in
|
||||||
-b|-c|-e|-d|-p|-t)
|
-b|-c|-e|-d|-p|-t)
|
||||||
@ -33,9 +32,8 @@ complete -F _badblocks badblocks
|
|||||||
have dumpe2fs &&
|
have dumpe2fs &&
|
||||||
_dumpe2fs()
|
_dumpe2fs()
|
||||||
{
|
{
|
||||||
COMPREPLY=()
|
local cur prev words cword
|
||||||
local cur prev
|
_init_completion || return
|
||||||
_get_comp_words_by_ref cur prev
|
|
||||||
|
|
||||||
case $prev in
|
case $prev in
|
||||||
-o|-V)
|
-o|-V)
|
||||||
@ -61,9 +59,8 @@ complete -F _dumpe2fs dumpe2fs
|
|||||||
have e2freefrag &&
|
have e2freefrag &&
|
||||||
_e2freefrag()
|
_e2freefrag()
|
||||||
{
|
{
|
||||||
COMPREPLY=()
|
local cur prev words cword
|
||||||
local cur prev
|
_init_completion || return
|
||||||
_get_comp_words_by_ref cur prev
|
|
||||||
|
|
||||||
case $prev in
|
case $prev in
|
||||||
-c|-h)
|
-c|-h)
|
||||||
@ -85,9 +82,8 @@ complete -F _e2freefrag e2freefrag
|
|||||||
have e2label &&
|
have e2label &&
|
||||||
_e2label()
|
_e2label()
|
||||||
{
|
{
|
||||||
COMPREPLY=()
|
local cur prev words cword
|
||||||
local cur cword
|
_init_completion || return
|
||||||
_get_comp_words_by_ref cur cword
|
|
||||||
|
|
||||||
if [ $cword -eq 1 ]; then
|
if [ $cword -eq 1 ]; then
|
||||||
cur=${cur:=/dev/}
|
cur=${cur:=/dev/}
|
||||||
@ -100,9 +96,8 @@ complete -F _e2label e2label
|
|||||||
have filefrag &&
|
have filefrag &&
|
||||||
_filefrag()
|
_filefrag()
|
||||||
{
|
{
|
||||||
COMPREPLY=()
|
local cur prev words cword
|
||||||
local cur
|
_init_completion || return
|
||||||
_get_comp_words_by_ref cur
|
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-B -b -s -v -x' -- "$cur" ) )
|
COMPREPLY=( $( compgen -W '-B -b -s -v -x' -- "$cur" ) )
|
||||||
@ -117,9 +112,8 @@ complete -F _filefrag filefrag
|
|||||||
have tune2fs &&
|
have tune2fs &&
|
||||||
_tune2fs()
|
_tune2fs()
|
||||||
{
|
{
|
||||||
COMPREPLY=()
|
local cur prev words cword
|
||||||
local cur prev
|
_init_completion || return
|
||||||
_get_comp_words_by_ref cur prev
|
|
||||||
|
|
||||||
case $prev in
|
case $prev in
|
||||||
-c|-C|-E|-i|-J|-L|-m|-r|-T)
|
-c|-C|-E|-i|-J|-L|-m|-r|-T)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user