Closed andrewwutw closed 8 months ago
Maybe this issue is related to #50.
The same $FZF_DEFAULT_COMMAND
setting, and the same error message unknown file attribute
.
I have the exact same issue, here is how I fixed it. The issue indeed comes from:
I believe that running this command find . -type f ( -path .git -o -path node_modules ) -prune is the problem.
This command does not work in zsh. If you run it you get what @andrewwutw said:
the same error message unknown file attribute
Fixing the command fixed the problem.
So, to achieve the desired result, the default FZF_DEFAULT_COMMAND
should be:
find . -type f -not \( -path "*/.git/*" -o -path "./node_modules/*" \)
This would search all files, excluding any file that is under a .git
folder or a node_modules
folder.
However, IMO, I belive this plugin should not change the default fzf command, as this is counter-intuitive and unexpected for new users. I used to use fzf
and installing this plugin broke it because of this FZF_DEFAULT_COMMAND
. Instead I would recommand setting the default fzf command to whatever fzf uses, i.e. no filters: find . -type f
I test on a Vagrant VM (ubuntu/focal64)
Make sure
fdfind
andrg
are not installed :Only
find
is installed.fdfind
andrg
are not.Install the plugin :
The plugin installs
fzf
executable file.Run
fzf
, and a problem occurred :Looks like
fzf
runs command specified by$FZF_DEFAULT_COMMAND
, and it is an error.$FZF_DEFAULT_COMMAND
is afind
command.Outputs :
But running this
find
command from zsh prompt :Failed, output is :
But if
fd
program is installed :Reload the plugin :
Now running
fzf
is ok.$FZF_DEFAULT_COMMAND
is change to usingfdfind
:Outputs :
Installing
rg
also fixes the problem.Outputs :
I believe that running this command
find . -type f ( -path .git -o -path node_modules ) -prune
is the problem.My zsh version :
zsh 5.8 (x86_64-ubuntu-linux-gnu)