fzf
fzf copied to clipboard
FZF not listing files in storage directory in termux $HOME
- [ ] I have read through the manual page (
man fzf
) - [x] I have the latest version of fzf
- [x] I have searched through the existing issues
Info
- OS
- [x] Linux
- [ ] Mac OS X
- [ ] Windows
- [ ] Etc.
- Shell
- [x] bash
- [ ] zsh
- [ ] fish
Problem
I am configuring vim in termux and I have decided use FZF to implement the fuzzy finding feature. I installed fzf using pkg install fzf
and mapped Ctrl + P
to open FZF dialogue. Everything works well. But when I'm in the home directory and I invoke FZF from there (inside vim using :FZF
), I don't get results from the storage subdirectory, which I don't expect. I used termux-setup-storage
to setup access to my phone's internal storage. This might be the same in some other directories, but the $HOME
directory is the one I've noticed. See image below:
When I use FZF in the home directory from the command line, everything works well. For example, I typed cd **
followed by tab
and I get something like this:
Please, what do you think is the problem. I'm not using the FZF vim plugin at all. Also, I changed the default command (to use fd instead of find).
Hi, this is the find
command fzf uses by default:
https://github.com/junegunn/fzf/blob/764316a53d0eb60b315f0bbcd513de58ed57a876/src/constants.go#L60-L61
Can you spot any issue with that? If you run the command manually, does it list the storage
dir?
I've just run the command and it does list files in the storage
dir as shown in the image below.
But there's a problem. I already changed this to another command (
fd
). See the image below. It shows the content of my .bashrc
after running cat
on it.
In addition to that, I already tried changing it to use find
again but it doesn't seem to work in vim. It says fd
command failed even after changing the default command to use find
and sourcing the .bashrc
.
I've just changed the command in my .bashrc
to the default command, but it doesn't seem to work anymore.
But it works on the command line
@vovcacik Kindly help me see to this. Do you know why the command would work from the command line but not from within vim.