I have a couple of macs. I'm able to install and run fzf on it. However 'cd **' form of autocomplete just does not work on either. On another linux box though, it does work. Meanwhile other commands like alias vimf='vim $(fzf)' also works on the mac.
Any reason why the cd autocomplete does not work?
I'm a mac user myself, and it works as expected.
Try something like the follows to see if it's a configuration issue.
bash --rcfile ~/.fzf/shell/completion.bash
it works now. why is this not part of the documentation? I think that is really helpful.
And also, thanks for a great tool. I love it and I'll be recommending it. I'd done other hacks and scripts in bash and go code to get something similar. But fzf rocks and I've kicked out my own scripts/code now.
Thanks. May I ask what the problem was?
I do not know honestly. I ran that command and it was ok.
was the install script supposed to have run it? I answered yes for the completion question.
Does it need to be run in sudo mode?
Btw, I didn't do a brew install. I'd installed it after git clone.
No, maybe you didn't reload your shell configuration file after the installation?
so this line needs to be added in a .bashrc/.profile?
What do you mean by "this line"? You mean bash --rcfile ~/.fzf/shell/completion.bash? Then no, it's not something you use regularly. I suggested the command to help you debug your configuration issue, as it isolates all other shell configuration.
In that case, adding that line to my .profile on macos/osx is what is making it work well for me.
My guess is that you're not loading your ~/.bashrc from your .profile or .bash_profile?
If that's the case, consider adding . ~/.bashrc to your ~/.bash_profile or ~/.profile.
Also take a look at #282.
You are correct. I wasn't using a .bashrc. I've sourced it now and it works fine. Thank you, and also apologies if I wasted your time.
No problem, thanks for clarification.
Thanks @junegunn
Most helpful comment
My guess is that you're not loading your ~/.bashrc from your .profile or .bash_profile?
If that's the case, consider adding
. ~/.bashrcto your ~/.bash_profile or ~/.profile.Also take a look at #282.