[vim] Escape ! when using :! to execute command

- call fzf#run({'source': "echo '!'"})
- call fzf#run({'source': "echo '!'", 'down': '40%'})

Close https://github.com/junegunn/fzf.vim/issues/315
pull/848/head
Junegunn Choi 7 years ago
parent e87a85a179
commit 76d3f6d248
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

@ -451,7 +451,7 @@ function! s:execute(dict, command, use_height, temps) abort
let stdin = has_key(a:dict, 'source') ? '' : '< /dev/tty'
call system(printf('tput cup %d > /dev/tty; tput cnorm > /dev/tty; %s %s 2> /dev/tty', &lines, command, stdin))
else
execute 'silent !'.command
execute 'silent !'.escape(command, '!')
endif
let exit_status = v:shell_error
redraw!

Loading…
Cancel
Save