Simplify the filtering

This commit is contained in:
Kien N 2013-02-05 07:36:43 +07:00
parent c1646e3c28
commit c1c00df70f

View File

@ -292,8 +292,7 @@ fu! ctrlp#clra()
let cadir = ctrlp#utils#cachedir()
if isdirectory(cadir)
let cafiles = split(s:glbpath(s:fnesc(cadir, 'g', ','), '**', 1), "\n")
let eval = '!isdirectory(v:val) && fnamemodify(v:val, ":t") !~'
\ . ' ''\v^<cache>[.a-z]+$|\.log$'''
let eval = '!isdirectory(v:val) && v:val !~ ''\v[\/]cache[.a-z]+$|\.log$'''
sil! cal map(filter(cafiles, eval), 'delete(v:val)')
en
cal ctrlp#clr()