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

error message about completion.bash in Kitty (fixable by adding set +o posix) #3550

Open
5 of 10 tasks
wturrell opened this issue Dec 25, 2023 · 2 comments
Open
5 of 10 tasks

Comments

@wturrell
Copy link

  • I have read through the manual page (man fzf)
  • I have the latest version of fzf
  • I have searched through the existing issues

Info

  • OS
    • Linux
    • Mac OS X
    • Windows
    • Etc.
  • Shell
    • bash
    • zsh
    • fish

Problem / Steps to reproduce

I frankly don't know if this is an fzf issue, a Kitty one or something unique to me (though I've checked all the obvious shell problems).

This was the error, when launching new windows in Kitty shell (but not in iTerm2 or PhpStorm terminal):

-bash: /opt/homebrew/opt/fzf/shell/completion.bash: line 279: syntax error near unexpected token <' -bash: /opt/homebrew/opt/fzf/shell/completion.bash: line 279: __fzf_orig_completion < <(complete -p "$orig_cmd" 2> /dev/null)'
-bash: `fzf-file-widget': not a valid identifier

I tried with both the old (Apple) and newest (homebrew) versions of bash.
I've read about similar problems with scripts running via sh when they should be using bash, but as you can see it's a bash error message.

I added set +o posix line 14 as per this suggestion https://stackoverflow.com/a/63397594/763419 and that has worked…

Any ideas? Thank you.

macOS Ventura 13.6, Kitty 0.31, fzf 0.44.1 (brew), bash (currently) 3.2.57

@junegunn
Copy link
Owner

I also use kitty but I don't have the problem and I have no idea what's going on. You might want to ask the maintainers of kitty, after replacing the fzf script with a simple line of code that can reproduce the problem. Something like:

cat <(echo)

@kovidgoyal
Copy link

Youa re probably running the outdated bash provided by apple: kovidgoyal/kitty#6926

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

No branches or pull requests

3 participants