Simplify _filedir arguments.
This commit is contained in:
parent
e846d84ed1
commit
37308e3594
@ -58,12 +58,12 @@ _mcrypt()
|
|||||||
--list-hash --verbose --quiet --help \
|
--list-hash --verbose --quiet --help \
|
||||||
--version --license' -- "$cur" ) )
|
--version --license' -- "$cur" ) )
|
||||||
elif [[ ${COMP_WORDS[0]} == mdecrypt ]]; then
|
elif [[ ${COMP_WORDS[0]} == mdecrypt ]]; then
|
||||||
_filedir '@(nc)'
|
_filedir nc
|
||||||
else
|
else
|
||||||
decrypt=0
|
decrypt=0
|
||||||
for (( i=1; i < ${#COMP_WORDS[@]}-1; i++ )); do
|
for (( i=1; i < ${#COMP_WORDS[@]}-1; i++ )); do
|
||||||
if [[ ${COMP_WORDS[i]} == -@(d|-decrypt) ]]; then
|
if [[ ${COMP_WORDS[i]} == -@(d|-decrypt) ]]; then
|
||||||
_filedir '@(nc)'
|
_filedir nc
|
||||||
decrypt=1
|
decrypt=1
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user