Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CTRL+T completion causes error #1460

Closed
4 of 15 tasks
f3rn0s opened this issue Dec 20, 2018 · 7 comments
Closed
4 of 15 tasks

CTRL+T completion causes error #1460

f3rn0s opened this issue Dec 20, 2018 · 7 comments
Labels

Comments

@f3rn0s
Copy link

f3rn0s commented Dec 20, 2018

  • Category
    • fzf binary
    • fzf-tmux script
    • Key bindings
    • Completion
    • Vim
    • Neovim
    • Etc.
  • OS
    • Linux
    • Mac OS X
    • Windows
    • Windows Subsystem for Linux
    • Etc.
  • Shell
    • bash
    • zsh
    • fish

I'm using ripgrep and fzf with key bindings, when I press Ctrl+T the output will have errors of no such file or directory that will not occur if I run the binary by typing the fzf command in.

./Desktop/Projects/security/university/CTFd/.direnv/python-3.6.6/lib/python3.6/os.py: No such file or directory (os error 2)
#FZF
export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_ALT_C_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_DEFAULT_OPTS='
--color fg:15,fg+:15,bg+:239,hl+:108
--color info:2,prompt:109,spinner:2,pointer:168,marker:168
'
@junegunn
Copy link
Owner

Check if rg --files --no-ignore --hidden --follow --glob "!.git/*" works as expected. You may need to use single-quotes because of !.

@f3rn0s
Copy link
Author

f3rn0s commented Dec 23, 2018

@junegunn Removing the glob still presents the same os error 2, and using fzf works fine normally...

The same issue is present in bash, I tried putting in the commands and they just gave an event error.

┌─╼[~] 
└─╼  rg --files --no-ignore --hidden --follow --glob "!.git/*"
zsh: event not found: .git/
┌─╼[~] 
└─╼  bash
[myuser@l ~]$ rg --files --no-ignore --hidden --follow --glob "!.git/*"
bash: !.git/: event not found

@junegunn
Copy link
Owner

Confirms that the command itself is incorrect and it's not an issue of fzf. Like I mentioned above, use single quotes to avoid ! expansion. See https://serverfault.com/questions/239046/strange-banghistory-bash-expand

@rationalthinker1
Copy link

rationalthinker1 commented May 19, 2020

I have this same issue too. I ran this
export FZF_CTRL_T_COMMAND="rg --files --smart-case --hidden --follow"

@cc978
Copy link

cc978 commented May 29, 2020

fd https://github.com/sharkdp/fd is better than rg especially for fzf, rg brings too much chaos to fzf
pls do not broadcast "fzf with rg" again, which a lot in google result
rg is not for directory-file name, fd is

fd as fast as rg without coloring, as:

export FZF_DEFAULT_COMMAND='fd --type f --color=never'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_ALT_C_COMMAND="fd --type d --color=never"

BurntSushi/ripgrep#169
#1083
BurntSushi/ripgrep#388

@pvarin
Copy link

pvarin commented Jun 5, 2021

In case anyone else comes here looking for an answer you can silence ripgrep error messages with the --no-messages option so that this should work

export FZF_DEFAULT_COMMAND="rg --files --hidden --follow --no-messages"

@ilium007
Copy link

ilium007 commented Jul 20, 2022

Any idea what's happening here then??

I'm using export FZF_DEFAULT_COMMAND="/usr/local/bin/rg --files --hidden --follow --no-messages" and get no such file or directory: /usr/local/bin/rg --files --hidden --follow --no-messages

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants