From e2c6f8cbf953f2b0b512e06a2fe6d1ddb566ba71 Mon Sep 17 00:00:00 2001 From: bhagwan Date: Tue, 8 Mar 2022 10:53:48 -0800 Subject: [PATCH] bugfix: 'lgrep_curbuf,' 'tags_live_grep' on fish shell (closes #357) --- lua/fzf-lua/providers/grep.lua | 2 +- lua/fzf-lua/providers/tags.lua | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/fzf-lua/providers/grep.lua b/lua/fzf-lua/providers/grep.lua index 47a883b..88bd5be 100644 --- a/lua/fzf-lua/providers/grep.lua +++ b/lua/fzf-lua/providers/grep.lua @@ -44,7 +44,7 @@ local get_grep_cmd = function(opts, search_query, no_esc) if opts.filespec and #opts.filespec>0 then search_path = opts.filespec elseif opts.filename and #opts.filename>0 then - search_path = vim.fn.shellescape(opts.filename) + search_path = libuv.shellescape(opts.filename) end search_query = search_query or '' diff --git a/lua/fzf-lua/providers/tags.lua b/lua/fzf-lua/providers/tags.lua index 2713579..2b67a8b 100644 --- a/lua/fzf-lua/providers/tags.lua +++ b/lua/fzf-lua/providers/tags.lua @@ -1,6 +1,7 @@ local core = require "fzf-lua.core" local path = require "fzf-lua.path" local utils = require "fzf-lua.utils" +local libuv = require "fzf-lua.libuv" local config = require "fzf-lua.config" local make_entry = require "fzf-lua.make_entry" @@ -13,7 +14,7 @@ local function get_tags_cmd(opts, flags) cmd = "rg" end if opts.search and #opts.search>0 then - query = vim.fn.shellescape(opts.no_esc and opts.search or + query = libuv.shellescape(opts.no_esc and opts.search or utils.rg_escape(opts.search)) elseif opts._curr_file and #opts._curr_file>0 then query = vim.fn.shellescape(opts._curr_file)