telescope-live-grep-args.nvim
telescope-live-grep-args.nvim copied to clipboard
Escape dash in prompt to prevent using beginning of the prompt as an option
Description
Rough, but it works 🤔 Looking forward to the author's review and comments.
Check for a dash at the beginning of the prompt and escape it. We need to escape dash at the beginning of the prompt because such dash will be interpreted as an option in rg.
Fixes #54
Type of change
- Bug fix (non-breaking change which fixes an issue)
How Has This Been Tested?
- [x] Search for phrases like: "--jobs 123", " --jobs 123", "here's -jobs 123", "'--jobs 123' --iglob *", "'here's --jobs 123' --iglob *", etc.
Configuration: NVIM v0.10.0-dev-6074+gfbe40caa7-Homebrew Build type: Release LuaJIT 2.1.1703358377
MacOS 14.2.1
Checklist:
- [x] My code follows the style guidelines of this project (stylua)
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] (no need) I have made corresponding changes to the documentation (lua annotations)