Ack: complete --type-set with the extensions of the files in cwd

This commit is contained in:
Julien Nicoulaud 2011-07-31 19:49:35 +02:00
parent 825c3b31d2
commit 54f6fa1db9
1 changed files with 2 additions and 1 deletions

3
_ack
View File

@ -149,7 +149,8 @@ _ack_colors() {
_ack_type_defs() {
local ret=1
if compset -P '*='; then
_message -e extensions 'extensions list' && ret=0 # TODO Provide the extensions of the files in the current dir here ?
local extensions; extensions=(*.*(:e))
_values -s "," "file extensions" "."$extensions && ret=0
else
_message -e type-name 'type name' && ret=0
fi