ipsec: Cosmetic tweaks.

This commit is contained in:
Ville Skyttä 2011-08-20 09:49:46 +03:00
parent e4f77de0b7
commit 93f786c6fd

View File

@ -7,11 +7,10 @@ have ipsec || return
# Reads a file from stdin in the ipsec.conf(5) format.
_ipsec_connections()
{
COMPREPLY=()
local keyword name
while read -r keyword name; do
if [[ $keyword = [#]* ]]; then continue; fi
[[ $keyword = 'conn' && $name != '%default' ]] && COMPREPLY+=("$name")
[[ $keyword == conn && $name != '%default' ]] && COMPREPLY+=( "$name" )
done
COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- "$cur" ) )
}