-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Embed shell integration scripts in fzf binary (--bash
/ --zsh
/ --fish
)
#3675
Conversation
This simplifies the distribution, and the users are less likely to have problems caused by using incompatible scripts and binaries. # Set up bash shell extension source <(fzf --bash) # Set up zsh shell extension source <(fzf --zsh)
--bash
& --zsh
)--bash
& --zsh
)
--bash
& --zsh
)--bash
/ --zsh
/ --fish
)
In Bash 3.2, the |
Is there a way to turn on either fzf --bash=[key-bindings | completion | all] defaulted to |
Ah, that's unfortunate. I wasn't aware of it. I liked
I thought about it, but I decided to keep it simple. We could add a magic comment at the top of each section so that advanced users can |
Thanks for your reply! |
fzf --bash | sed -n '/### completion/,$p' fzf --bash | sed '/### completion/,$d'
bc85ce1
to
36e109b
Compare
36e109b
to
8e47e75
Compare
089ca03
to
b24eb8b
Compare
b24eb8b
to
d71c96b
Compare
@junegunn I suggested evaluating the integration shell scripts by One solution is to avoid using Lines 30 to 34 in 4cd37fc
can be modified to additionally print
|
@akinomyoga Thanks, I'll update the script files. We used to wrap the whole thing before f103aa4. |
So that there's no error even when the scripts are mistakenly evaluated in non-interactive sessions. bash -c 'eval "$(fzf --bash)"; echo done' zsh -c 'eval "$(fzf --zsh)"; echo done' * #3675 (comment) * f103aa4
Thank you for fixing it! I think the fish integration script also needs to be adjusted. Line 14 in 4cd37fc
|
We instruct fish users to use https://github.com/junegunn/fzf?tab=readme-ov-file#setting-up-shell-integration And as far as I can tell, it doesn't have the same issue. |
Ah, OK! I missed it. Sorry for the noise, and thank you for the clarification. I think now everything should be fine. Thank you for your quick responses and actions. |
This simplifies the distribution, and the users are less likely to have problems caused by using incompatible scripts and binaries.