Comments (8)
Hmm, works for me with the $
! I use this all the time. I wonder why it's not working for you 🤔
from vim-agriculture.
I believe this was to preserve manual backslash escaping. It's called ANSI-C quoting when you $'some string'
(see bash manual here).
Again, I wonder why this doesn't work in your environment. What's your OS, Vim version, bash/zsh version, etc?
from vim-agriculture.
Thanks for the quick response! My env is:
- Ubuntu 18.04 LTS
- kitty terminal
- fish shell (but I have tried in bash as well with same issue)
- neovim 0.4.4
It seems most likely that the issue is fish shell, let me try again with bash and the built-in terminal client.
from vim-agriculture.
OK, I changed my shell with chsh
and restarted my computer and now it does work with the $$$
s. I will close the PR but I don't really know what a cross-shell solution would be. Will investigate when I have time.
from vim-agriculture.
@allhailwesttexas ah good find! If that's all that doesn't work, I'd like to find a solution for fish shell. Will keep this open and look into it. Thanks!
from vim-agriculture.
@jesseleite what is the reason behind using bash ansi-c quotes, is it to escape and forward the user query to fzf
(akin to raw strings in python/js).
vim-agriculture/autoload/agriculture.vim
Line 33 in 1095d90
I gleaned this from fzf-vim
docs regarding ripgrep and it feels like this might be the same use case, trying to take multi-word command line arguments and present them as the query . Does vim's shellescape
work here? That could keep it shell agnostic 👍
function! RipgrepFzf(query, fullscreen)
let command_fmt = 'rg --column --line-number --no-heading --color=always --smart-case -- %s || true'
let initial_command = printf(command_fmt, shellescape(a:query))
let reload_command = printf(command_fmt, '{q}')
let spec = {'options': ['--phony', '--query', a:query, '--bind', 'change:reload:'.reload_command]}
call fzf#vim#grep(initial_command, 1, fzf#vim#with_preview(spec), a:fullscreen)
endfunction
from vim-agriculture.
@ipwnponies Oh interesting! Will look into shellescape()
, thanks for that info!
from vim-agriculture.
Nice!
from vim-agriculture.
Related Issues (13)
- Options which return files seem to break file selection
- Results don't appear in fzf immediately on large projects HOT 1
- Update preview functionality?
- Respect .gitignore HOT 2
- RgRaw doesn't work if g:fzf_preview_window is list
- Argument to extend() is not a list or dictionary in s:preview(bang, ...) HOT 1
- Search in current buffer HOT 5
- Neovim Support HOT 2
- Preview option? HOT 2
- how to make it always search from project root HOT 3
- How to preview file on the quickfix list without jumping out of it? HOT 4
- RgRaw returns fewer matches than the default function HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-agriculture.