cryptsetup, wvdial: Use _split_longopt().
This commit is contained in:
parent
7fb4e3137d
commit
4ea93b286e
@ -17,15 +17,20 @@ _cryptsetup_device()
|
|||||||
_cryptsetup()
|
_cryptsetup()
|
||||||
{
|
{
|
||||||
local cur prev words cword
|
local cur prev words cword
|
||||||
_init_completion || return
|
_init_completion -n = || return
|
||||||
|
|
||||||
|
local split=false
|
||||||
|
_split_longopt && split=true
|
||||||
|
|
||||||
case $prev in
|
case $prev in
|
||||||
--key-file|--master-key-file|--header-backup-file|-d)
|
--key-file|--master-key-file|--header-backup-file|-d)
|
||||||
_filedir
|
_filedir
|
||||||
return 0;
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
$split && return
|
||||||
|
|
||||||
local arg
|
local arg
|
||||||
_get_first_arg
|
_get_first_arg
|
||||||
if [ -z $arg ]; then
|
if [ -z $arg ]; then
|
||||||
|
@ -5,7 +5,10 @@ have wvdial || return
|
|||||||
_wvdial()
|
_wvdial()
|
||||||
{
|
{
|
||||||
local cur prev words cword
|
local cur prev words cword
|
||||||
_init_completion || return
|
_init_completion -n = || return
|
||||||
|
|
||||||
|
local split=false
|
||||||
|
_split_longopt && split=true
|
||||||
|
|
||||||
case $prev in
|
case $prev in
|
||||||
--config)
|
--config)
|
||||||
@ -14,6 +17,8 @@ _wvdial()
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
$split && return
|
||||||
|
|
||||||
local config i IFS=$'\n'
|
local config i IFS=$'\n'
|
||||||
|
|
||||||
case $cur in
|
case $cur in
|
||||||
|
Loading…
x
Reference in New Issue
Block a user