aboutsummaryrefslogtreecommitdiffstats
path: root/ls-grep.vim
blob: aaa7d42d943ffa8b5284e660e0118ce05a974597 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
function! LsGrep(search)
	redir => ls_output
	silent ls
	redir END
	
	let ls_output = system("echo " . shellescape(ls_output) . " | grep " . shellescape(a:search))
	
	echo ls_output
endfunction


command! -nargs=1 LsGrep call LsGrep(<args>)