piersolenski / telescope-import.nvim

Import modules with ease
186 stars 8 forks source link

Error with fish-shell #16

Closed bujessepc closed 9 months ago

bujessepc commented 9 months ago

Fish shell considers $ inside double-quotes as a special character and thus needs to be escaped.

It produces this error:

image

There are 2 ways to fix this; either detect the current shell and apply an escaped version if fish, or allow users to override the default language settings.

I tried to do the second approach, but looking at the code, I think only the first matching filetype config gets returned; and the default built-in ones come first: https://github.com/piersolenski/telescope-import.nvim/blob/0270f1438c0ac91663146a73a213bfdc536a8cb5/lua/import/utils.lua#L52 https://github.com/piersolenski/telescope-import.nvim/blob/0270f1438c0ac91663146a73a213bfdc536a8cb5/lua/import/picker.lua#L12

I have this fixed locally by just prepending a backslash directly in the plugin code, but just wanted to raise this if others encounter this issue.