Use compgen -W instead of grepping $cur in vpnc.

This commit is contained in:
Ville Skyttä 2009-06-12 20:10:18 +03:00
parent f17d4ae5bb
commit 215cdb9cf4

View File

@ -40,7 +40,7 @@ _vpnc()
--pid-file --local-port --udp-port --disable-natt \
--non-inter' -- $cur ) )
else
COMPREPLY=( $( command ls /etc/vpnc | grep "^$cur" ) )
COMPREPLY=( $( compgen -W '$( command ls /etc/vpnc )' -- $cur ) )
fi
} &&
complete -F _vpnc vpnc