improve :BundleClean
This commit is contained in:
parent
f49bbe8598
commit
97d4520c50
@ -92,18 +92,18 @@ func! vundle#installer#clean(bang) abort
|
|||||||
let x_dirs = filter(all_dirs, '0 > index(bundle_dirs, v:val)')
|
let x_dirs = filter(all_dirs, '0 > index(bundle_dirs, v:val)')
|
||||||
|
|
||||||
if empty(x_dirs)
|
if empty(x_dirs)
|
||||||
echo "All clean!"
|
let headers = ['" All clean!']
|
||||||
return
|
let names = []
|
||||||
|
else
|
||||||
|
let headers = ['"Remove those bundles?']
|
||||||
|
let names = map(copy(x_dirs), 'fnamemodify(v:val, ":t")')
|
||||||
end
|
end
|
||||||
|
|
||||||
let names = map(copy(x_dirs), 'fnamemodify(v:val, ":t")')
|
call vundle#scripts#view('clean', headers, names)
|
||||||
call vundle#scripts#view('clean', ['"Remove those bundles?'], names)
|
|
||||||
redraw!
|
redraw!
|
||||||
|
|
||||||
if (a:bang || input('Are you sure you want to remove '.len(names).' bundles? [ y/n ]:') =~? 'y')
|
if (a:bang || empty(names) || input('Are you sure you want to remove '.len(names).' bundles? [ y/n ]:') =~? 'y')
|
||||||
|
|
||||||
call s:process(a:bang, 'delete', names)
|
call s:process(a:bang, 'delete', names)
|
||||||
|
|
||||||
echo 'Done!'
|
echo 'Done!'
|
||||||
endif
|
endif
|
||||||
endf
|
endf
|
||||||
|
Loading…
Reference in New Issue
Block a user