Comments (7)
What's the version of your zsh?
zsh --version
Is the problem still reproducible on zsh without any configuration?
zsh -d -f
source <(fzf --zsh)
# Or if fzf is not in your $PATH
source <(~/.fzf/bin/fzf --zsh)
from fzf.
same issue. tried with the homebrew zsh and apple zsh.
zsh --version
zsh 5.9 (x86_64-apple-darwin23.0)
opt/homebrew/bin/zsh --version
zsh 5.9 (arm-apple-darwin23.0.0)
fzf-bug.mp4
from fzf.
Could you share the output when running the following commands one after another?
# Improved trace prompt
PS4='%B%F{0}+ %D{%T:%3.} %2N:%i%f%b '
# Clears current shell history to minimize debug output
fc -p =(<<<"")
unsetopt KSH_OPTION_PRINT
setopt
fzf --version
source <(fzf --zsh)
# Enable tracing for the function
typeset -fT fzf-history-widget
# Press Ctrl-R, then Enter
from fzf.
CTRL-R uses Perl since 0.53.0. Could this be a problem with the Perl installation? perl --version
?
from fzf.
here is the trace outputs
~/.fzf tags/0.53.0 45s
❯ PS4='%B%F{0}+ %D{%T:%3.} %2N:%i%f%b '
~/.fzf tags/0.53.0
❯ fc -p =(<<<"")
~/.fzf tags/0.53.0
❯ unsetopt KSH_OPTION_PRINT
~/.fzf tags/0.53.0
❯ setopt
alwaystoend
autocd
autopushd
combiningchars
completeinword
extendedhistory
noflowcontrol
histexpiredupsfirst
histignoredups
histignorespace
histverify
interactive
interactivecomments
login
longlistjobs
monitor
nopromptcr
nopromptsp
promptsubst
pushdignoredups
pushdminus
sharehistory
shinstdin
zle
~/.fzf tags/0.53.0
❯ fzf --version
0.53.0 (c4a9ccd)
~/.fzf tags/0.53.0
❯ source <(fzf --zsh)
~/.fzf tags/0.53.0
❯ typeset -fT fzf-history-widget
~/.fzf tags/0.53.0
❯ + 17:18:46:611 fzf-history-widget:1 local selected num
+ 17:18:46:611 fzf-history-widget:2 setopt localoptions noglobsubst noposixbuiltins pipefail no_aliases
+ 17:18:46:612 fzf-history-widget:5 zmodload -F zsh/parameter p:history
+ 17:18:46:612 fzf-history-widget:5 (( 22 ))
+ 17:18:46:612 fzf-history-widget:6 selected=+ 17:18:46:616 fzf-history-widget:6 printf '%1$s\t%2$s\000' 6 $'typeset -fT fzf-history-widget\n' 5 $'source <(fzf --zsh)\n' 4 $'fzf --version\n' 3 setopt 2 $'unsetopt KSH_OPTION_PRINT\n' 1 ''
+ 17:18:46:612 fzf-history-widget:6 selected=+ 17:18:46:617 fzf-history-widget:7 perl -0 -ne 'if (!$seen{(/^\s*[0-9]+\**\s+(.*)/, $1)}++) { s/\n/\n\t/gm; print; }'
+ 17:18:46:612 fzf-history-widget:6 selected=+ 17:18:46:617 fzf-history-widget:8 __fzfcmd
+ 17:18:46:612 fzf-history-widget:6 selected=+ 17:18:46:619 fzf-history-widget:8 FZF_DEFAULT_OPTS=+ 17:18:46:620 fzf-history-widget:8 __fzf_defaults '' '-n2..,.. --scheme=history --bind=ctrl-r:toggle-sort --highlight-line --query="" +m --read0'
+ 17:18:46:619 fzf-history-widget:8 FZF_DEFAULT_OPTS=$'--height 40% --bind=ctrl-z:ignore \n -n2..,.. --scheme=history --bind=ctrl-r:toggle-sort --highlight-line --query="" +m --read0' FZF_DEFAULT_OPTS_FILE='' fzf
+ 17:18:46:612 fzf-history-widget:6 selected=$'4\tfzf --version\n\t'
+ 17:18:49:857 fzf-history-widget:15 local ret=0
+ 17:18:49:857 fzf-history-widget:16 [ -n $'4\tfzf --version\n\t' ']'
+ 17:18:49:857 fzf-history-widget:17 num=+ 17:18:49:857 fzf-history-widget:17 num=+ 17:18:49:862 fzf-history-widget:17 awk '{print $1; exit}'
+ 17:18:49:862 fzf-history-widget:17 grep -o '^[1-9][0-9]*'
+ 17:18:49:857 fzf-history-widget:17 num=$'\C-[[01;31m\C-[[K4\C-[[m\C-[[K'
+ 17:18:49:868 fzf-history-widget:18 zle vi-fetch-history -n $'\C-[[01;31m\C-[[K4\C-[[m\C-[[K'
+ 17:18:49:868 fzf-history-widget:23 zle reset-prompt
~/.fzf tags/0.53.0
❯
I tried with apple perl (v5.34.1) and homebrew perl (v5.38.2).
from fzf.
It looks like your "grep" is injecting color codes to the output when it shouldn't. What is the output of type grep
?
from fzf.
@junegunn great find. I have GREP_OPTIONS
set.
GREP_OPTIONS=--color=always -I --exclude=tags --exclude-dir={.svn,.git,target}
grep is an alias for grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}
grep --version
grep (BSD grep, GNU compatible) 2.6.0-FreeBSD
Unsetting it and fzf
works again.
from fzf.
Related Issues (20)
- Commit 83b60339 broke use of pbogut/fzf-mru.vim plugin HOT 6
- arrow up keybinding is showing no scrollable list HOT 11
- unknown option --no-tmux error HOT 1
- consider adding `--head` option? HOT 1
- Security Alert: Potential Trojan Detected in Windows Release v0.54.1 HOT 5
- [Feature Request] Line numbers for selectable results HOT 4
- Fzf 0.54.1 mac arm64 release contains a `._fzf` file HOT 3
- Using `FZF_POS` has a high impact on performance HOT 6
- Change tagline
- Request: Add a match whole word option HOT 3
- FZF + interactive RipGrep deadlock HOT 5
- Fzf window not showing in process substitution using zsh HOT 1
- `fzf --tmux bottom` opens tmux popup on the top HOT 5
- Impossible to get "sudo su" to be prioritized HOT 4
- Wrong list scrolling with --read0 and --height HOT 2
- Help creating custom fuzzy seach command script. HOT 1
- [Feature Request] Handle pytest command the same as python HOT 9
- Requires tmux 3.2 or above not only popup window
- Support comments within FZF_DEFAULT_OPTS_FILE content HOT 2
- Matching with word boundaries HOT 7
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.