From 1c75d1ed18ed708d0e2a6aeac66e8917d8220cff Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 23 Nov 2014 13:00:59 -0500 Subject: ls-grep.vim: Allow a search string Add capability to search for an arbitrary string. --- ls-grep.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ls-grep.vim b/ls-grep.vim index c369c1d..85a8334 100644 --- a/ls-grep.vim +++ b/ls-grep.vim @@ -1,12 +1,12 @@ -function! LsGrep() +function! LsGrep(search) redir => ls_output silent ls redir END - let ls_output = system("echo " . shellescape(ls_output) . " | grep " . "ls") + let ls_output = system("echo " . shellescape(ls_output) . " | grep " . shellescape(a:search)) echo ls_output endfunction -call LsGrep() +call LsGrep("ls") -- cgit v1.2.3