Silence errors when ack doesn't support --dump

It seems to be new in ack 2.x and with 1.96 I get error messages when
the ack completions are loaded.
This commit is contained in:
Dag Odenhall 2013-05-09 12:53:19 +02:00 committed by ridiculousfish
parent b03515276e
commit ce0c52d353

View file

@ -84,7 +84,7 @@ complete -c ack -l bar -d 'The warning admiral'
# File types
if type ack > /dev/null
for type in (ack --dump | perl -lne 'print $1 if /^\s+--type-add=([^:]+)/' | uniq)
for type in (ack --dump ^/dev/null | perl -lne 'print $1 if /^\s+--type-add=([^:]+)/' | uniq)
complete -c ack -l $type -d "Allow $type file type"
complete -c ack -l no$type -l no-$type -d "Don't allow $type file type"
end