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
Have to select file twice in zsh #2
Comments
Hmm, I can't reproduce the problem. Tested it on zsh 5.0.2 (x86_64-apple-darwin13.0) |
Woops, my mistake, it only occurs when using oh-my-zsh. I'm gonna try to figure out exactly what it is, obviously not the fault of your script. Sorry for the false issue |
For the record, this function that's in a file getting sourced is causing the problem: function title { Specifically the |
No problem. Please let me know if you find out the cause, maybe I could mention it in the README page. Thanks. |
Oh, thanks. Did you find a workaround? I'll try to look into it, but I'm completely ignorant on zsh or oh-my-zsh. |
Did you use backticks to execute fzf? I can see the problem you mentioned when I use backticks as follows.
However, the following works fine.
|
As reported in #2, backticks on oh-my-zsh (with TERM=xterm*) makes fzf run twice. This should be a bug of oh-my-zsh, but for now using $() seems to be a quick workaround.
Yep, I was using backticks and it works fine with $(), thanks! |
Honestly I have no idea at all. |
I was happening to me too, before I removed the
No idea why. |
Favors the line with shorter matched chunk. A chunk is a set of consecutive non-whitespace characters. Unlike the default `length`, this new scheme works well with tabular input. # length prefers item #1, because the whole line is shorter, # chunk prefers item #2, because the matched chunk ("foo") is shorter fzf --height=6 --header-lines=2 --tiebreak=chunk --reverse --query=fo << "EOF" N | Field1 | Field2 | Field3 - | ------ | ------ | ------ 1 | hello | foobar | baz 2 | world | foo | bazbaz EOF If the input does not contain any spaces, `chunk` is equivalent to `length`. But we're not going to set it as the default because it is computationally more expensive. Close #2285 Close #2537 - Not the exact solution to --tiebreak=length not taking --nth into account, but this should work. And the added benefit is that it works well even when --nth is not provided. - Adding a bonus point to the last character of a word didn't turn out great. The order of the result suddenly changes when you type in the last character in the word producing a jarring effect.
When invoking fzf with zsh, the first time you select a file and hit enter the selection seems to be ignored, and you have to do it again, then it behaves as expected. Works perfectly in bash.
The text was updated successfully, but these errors were encountered: