Comments (12)
Thanks for the input. Will check again later, for some reason I can't connect to a Windows EC2 instance. π€·
from fzf.
Thanks for reporting this serious issue. 0.52.1 is a (hurried) attempt to fix the issue. Please test if it helps. I'm sure there are some other issues lurking, but at least it should be safer than what we had in 0.52.0.
from fzf.
FYI, the last working version is 0.50
, due to the fact the "
is prefixed with a caret ^
.
Using the below command we fail on purpose so we can look at the escaping sequence:
fzf --ansi --disabled --bind="change:IF {q}"
from fzf.
Searching for "
works for me.
It works on cmd.exe,
And it works with :RG
command of fzf.vim
I'm testing this on an EC2 Windows 16 server instance. Not sure if things are different on different versions of Windows.
from fzf.
Searching for " works for me.
Does it also work with (when {q}
isn't the last argument of the cmd)?
fzf --ansi --disabled --bind="change:reload:rg --line-number --column --color=always {q} 2>&1"
from fzf.
@junegunn, you didn't test my use-case properly, I can see the command you ran in the screenshot:
THIS WORKS
fzf --disabled --preview-window up --preview "rg --line-number --column --color=always -- {q}"
BOTH WORK ON
0.50
AND FAIL ON0.52
fzf --disabled --preview-window up --preview "rg --line-number --column --color=always -- {q} 2>&1"
fzf --disabled --preview-window up --preview "rg --line-number --column --color=always -- {q} || break"
The reason I need to add 2&1 || break
is explained in the OP.
from fzf.
@junegunn, the current escape sequnce also fails when searching for special characters prefixed by "
, try:
fzf --disabled --preview-window up --preview "rg --line-number --column --color=always -- {q}"
Search for
"\|
Search for
".*&
, the&
part of the regex is ignored, effectively searching for".*
only
fzf.vim's RG
will also fail with these examples:
from fzf.
Thanks for reporting this serious issue. 0.52.1 is a (hurried) attempt to fix the issue. Please test if it helps. I'm sure there are some other issues lurking, but at least it should be safer than what we had in 0.52.0.
Tysm @junegunn! I have seen some other oddities happening but will have to test this throughly so I can pinpoint the exact issue and whether this is a bug or just different behavior for which fzf-lua will have to adjust.
Will report back tomorrow.
from fzf.
@junegunn, everything seems to be in order at first glance, but I think that ;
also needs to be escaped with a caret.
Consider the following which attempts to run rg
only when the user inputs a non-empty string (to avoid feeding all project lines unnecessarily):
fzf --ansi --disabled --bind="change:reload:IF {q} NEQ \^"^^\" rg --line-number --column --color=always {q}"
The condition works fine in all special characters I tested aside from ;
, using ^;
(in the code) solves the issue:
I believe ;
should be added to the list of special characters in:
Line 24 in 6432f00
So that it will later be preceded by ^
in:
Lines 137 to 139 in 6432f00
from fzf.
So I guess the problem with ;
is relatively benign compared to the previous flaw, which would allow all kinds of crazy stuff?
Didn't know ;
needed escaping. I'll address it in the next release. But I'm not going to rush it and take some time to hear from other Windows users (#3790).
In the meantime, maybe you could work around it by using a batch file and not directly writing conditionals in the binding expression? Just guessing.
from fzf.
So I guess the problem with
;
is relatively benign compared to the previous flaw, which would allow all kinds of crazy stuff? Didn't know;
needed escaping. I'll address it in the next release. But I'm not going to rush it and take some time to hear from other Windows users (#3790).
I also had no idea ;
was a meta character, definitely no rush in this itβs totally benign.
In the meantime, maybe you could work around it by using a batch file and not directly writing conditionals in the binding expression? Just guessing.
I already have this handled in the lua wrapper this was just something that was popping up in the native
versions of the pickers, itβs an edge case of an edge case.
from fzf.
Good to hear that, thanks.
from fzf.
Related Issues (20)
- Requires tmux 3.2 or above not only popup window HOT 1
- Support comments within FZF_DEFAULT_OPTS_FILE content HOT 5
- Matching with word boundaries HOT 7
- fzf version for linux too outdated HOT 1
- "Error: Not support reporting screen sizes in pixels" when previewing images in kitty from tmux with `--tmux` option. HOT 2
- feature request: add support for `-S fg=<color> -s fg=<color>` tmux popup flags in fzf-tmux HOT 2
- Support elvish shell condition in --bind HOT 9
- unknown option: --bash HOT 1
- on windows, using gitbash/mintty, fzf reverse history search (ctrl-r) hangs the terminal indefinitely HOT 4
- The `--txux` flag ignored when set from the config file HOT 4
- Santa blocking execution HOT 1
- vim fzf doesn't work with the latest vim junegunn/fzf HOT 2
- Please add 'command' bindkey in Macos
- Anchor match (specifically the "suffix-exact-match") doesn't seems to be working as expected! HOT 3
- [Feature request] improve performance handling iterm2 image protocol in `--preview`
- Sort by length with --disabled HOT 2
- Placeholder expression for accept/print actions
- Bash history integration on Mac prefixing selected command with reverse index HOT 2
- fzf sixels image preview empty on Windows Terminal Preview + pwsh + chafa on Windows HOT 9
- Creating a bind that rebinds events / a way to toggle between 'rg --hidden' and 'rg' in ripgrep examples from fzf/ADVANCED.md HOT 2
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 fzf.