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


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