far.vim icon indicating copy to clipboard operation
far.vim copied to clipboard

Far search fails if folder / file name containing characters {{ or }}

Open axsaucedo opened this issue 3 years ago • 0 comments

When running far on a project where a folder / file contains the charaters {{ or }} the following error appears

rror caught in async handler '/home/.vim/plugged/far.vim/rplugin/python3/far:function:_far_nvim_rpc_async_invoke [[['mod = importlib.import_module("far.sources.shell")', 'res = mod
.search({"case_sensitive": -1, "pattern": "repo_name", "replace_with": "folder_name", "range": [-1, -1], "source": "rgnvim", "pattern_proc": "\\\\vrepo_name", "limit": 1000, "file_mask": "**/
*", "cwd": "/Programming/sml-security", "word_boundary": 0, "regex": 1}, {"cmd": ["rg", "-0", "--json", "--with-filename", "--no-heading", "--vimgrep", "--max-count={limit}", "
{pattern}", "{file_mask}"], "submatch": "all", "max_columns": 400, "items_file_min": 30, "glob_mode": "rg", "expand_cmdargs": 1, "ignore_files": ["/home/alejandro/.vim/plugged/far.vim/farigno
re"]},["--smart-case"])', 'self.nvim.command("call far#executors#nvim#callback("+str(res)+", 1)")']]]'
Traceback (most recent call last):
  File "/home/alejandro/.vim/plugged/far.vim/rplugin/python3/far/__init__.py", line 31, in _far_nvim_rpc_invoke
    exec(execline)
  File "<string>", line 1, in <module>
  File "/home/miniconda3/lib/python3.7/site-packages/pynvim/api/nvim.py", line 287, in command
    return self.request('nvim_command', string, **kwargs)
  File "/home/miniconda3/lib/python3.7/site-packages/pynvim/api/nvim.py", line 182, in request
    res = self._session.request(name, *args, **kwargs)
  File "/home/miniconda3/lib/python3.7/site-packages/pynvim/msgpack_rpc/session.py", line 102, in request
    raise self.error_wrapper(err)
pynvim.api.common.NvimError: Vim(call):E15: Invalid expression: \', \'_\') }}",', 'match': 'repo_name'}]}]}, 1)
Press ENTER or type command to continue

This can be replicated by running a search on a project like https://github.com/drivendata/cookiecutter-data-science

axsaucedo avatar Jun 03 '22 12:06 axsaucedo