Git Product home page Git Product logo

Comments (12)

junegunn avatar junegunn commented on May 13, 2024

Hmm, even a very simple ls | fzf doesn't work reliably on fish on Ubuntu 14.

jg@jg-VirtualBox ~> ls | fzf
  # returns immediately
jg@jg-VirtualBox ~> fg
Send job 2, β€œ/usr/bin/ruby --disable-gems /home/jg/.fzf/fzf $argv” to foreground
/home/jg/.fzf/fzf:791:in `getc': Input/output error (Errno::EIO)
    from /home/jg/.fzf/fzf:791:in `get_input'
    from /home/jg/.fzf/fzf:995:in `start_loop'
    from /home/jg/.fzf/fzf:232:in `start'
    from /home/jg/.fzf/fzf:1194:in `<main>'

from fzf.

neersighted avatar neersighted commented on May 13, 2024

I am also having this issue...

from fzf.

junegunn avatar junegunn commented on May 13, 2024

Yup, It seems to be caused by a bug or limitation of fish on Linux, unlike ls | fzf, ls | ruby ~/.fzf/fzf works fine. I'm looking for a workaround.

from fzf.

neersighted avatar neersighted commented on May 13, 2024

I'm working on making fzf_key_bindings.fish suck less for my dotfiles, (no offense, it's just not good fish 😝) and you're welcome to my changes when I finish.

Also, seems to be working for me when I set TMPDIR. I fix this in my changes, among other issues.

The changed code will be in neersighted/dotfiles.

from fzf.

junegunn avatar junegunn commented on May 13, 2024

Sounds great, actually I was secretly hoping for some help :)
It would be even better if TMPDIR is not required all. Please let me know of the progress, thanks!

from fzf.

neersighted avatar neersighted commented on May 13, 2024

Does fzf not block in pipes? I seem to be having some trouble with a cd from stdin function, debugging shows that the function is being called before fzf writes to stdout.

from fzf.

junegunn avatar junegunn commented on May 13, 2024

I think it's related to this issue: see http://stackoverflow.com/questions/22729298/fish-command-substitution-issue-with-interactive-command

from fzf.

neersighted avatar neersighted commented on May 13, 2024

Done! See the refactored code at https://github.com/neersighted/dotfiles/blob/master/config/fish/functions/fzf_key_bindings.fish

from fzf.

junegunn avatar junegunn commented on May 13, 2024

Awesome! I'll test it tonight. You interested in sending a pull request?

And, have you found a way to circumvent the aforementioned problem (#60 (comment))? It happens on Ubuntu, but not on OSX.

from fzf.

neersighted avatar neersighted commented on May 13, 2024

I can pull it out into a pull request or you can just copy the file from my repo. It seems to fix this issue for me.

from fzf.

junegunn avatar junegunn commented on May 13, 2024

Either way is fine for me. Just felt like I should ask you first :)

from fzf.

neersighted avatar neersighted commented on May 13, 2024

Ah, my ls is long by default. If I define fzf as a function and pipe dir, or command ls into it, it hangs. However, I think this is a fzf issue with one line of input, as the output of ls/dir is only one line long and space delimited. I do not have the same issue with find.

from fzf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.