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

No max length limit of --query or multiple line layout support #1312

Closed
3 of 15 tasks
statfs opened this issue Jun 12, 2018 · 8 comments
Closed
3 of 15 tasks

No max length limit of --query or multiple line layout support #1312

statfs opened this issue Jun 12, 2018 · 8 comments
Milestone

Comments

@statfs
Copy link

statfs commented Jun 12, 2018

  • Category
    • fzf binary
    • fzf-tmux script
    • Key bindings
    • Completion
    • Vim
    • Neovim
    • Etc.
  • OS
    • Linux
    • Mac OS X
    • Windows
    • Windows Subsystem for Linux
    • Etc.
  • Shell
    • bash
    • zsh
    • fish

It seems that the --query switch can pass a very long content, but it will be truncated.
The interactive query length also limited by the terminal/window size.
So if it can be a solution with multiple line layout support for the query?

@junegunn
Copy link
Owner

I don't think it's worth the effort. What would be the point of allowing exceptionally long query strings? Also, the time complexity of the search algorithm of fzf is proportional to the length of the query, so having some limit makes sense in that regard as well.

@statfs
Copy link
Author

statfs commented Jun 18, 2018

this is my scenario, I'm using cmux (https://github.com/kakao/cmux) to operation a huge cluster, which filter the node by fzf.
The cluster consist of 2000 machines, when I need filter 3 nodes out of them by hostname, it is very easy by a query "node111 | node293 | node123 ". But it's very hard to filter more than 10 nodes because the length limit of query.
A long query will effect the search efficiency indeed, but my case is: to accurately describe a result set from condicates, the length limit of query may be a little bigger.
Thank you very much.
@junegunn

@junegunn
Copy link
Owner

Interesting, thanks for the clarification. I think I'm going to make the query prompt horizontally scrollable, so that longer queries can be typed in. But I'm still going to put some limit on the maximum length of a query. How long do you think your query will grow? Is 300-char limit enough?

@statfs
Copy link
Author

statfs commented Jun 26, 2018

@junegunn can we just provide a switch to set the maximum length of a query, 300 char works at most of times, but it should have the ability to work at 3000 or 30000.
Thank you.

@junegunn
Copy link
Owner

junegunn commented Jun 27, 2018

Can you describe what you're trying to achieve with such a long query on cmux in detail? Typing in tens or hundreds of hostnames doesn't sound like an elegant solution. I happen to be one of the maintainers of cmux, so if your use case sounds valid, I can consider adding features to cmux that might allow you to achieve the same more efficiently.

@statfs
Copy link
Author

statfs commented Jun 27, 2018

@junegunn My case is rolling restart hundreds or thousands roles(like datanode, nodemanager). I just add a switch for rolling restart just like

cmux rrr -q "node111 | node293 | node123"

Then I can restart these roles without typing and choosing, and the query contains a lot hostnames which are not easy to describe by regex. The query are generated by a script.
So I just want restart a lot roles from command, in non-interactive way.
Thank you for your patience.

@junegunn
Copy link
Owner

I see. I'll discuss the issue with the main author of cmux.

@junegunn junegunn added this to the 0.17.5 milestone Oct 5, 2018
@vapniks
Copy link

vapniks commented Oct 28, 2021

I came up against the query length limit just now; I'm using fzf to get a live preview of an ffmpeg filtergraph, using my fzfrepl script. I was unable to enter this 307 chars long example:

nullsrc,split=2[vid1][vid2];anullsrc,asplit=2[aud1][aud2];[vid1]trim=60:65,setpts=PTS-STARTPTS[v0];[aud1]atrim=60:65,asetpts=PTS-STARTPTS[a0];[vid2]trim=120:125,setpts=PTS-STARTPTS[v1];[aud2]atrim=120:125,asetpts=PTS-STARTPTS[a1];[v0][a0][v1][a1]concat=n=2:v=1:a=1[outv][outa];[outv]nullsink,[outa]anullsink

(obtained from here: https://video.stackexchange.com/questions/22769/ffmpeg-filter-complex-says-filter-not-connected-to-source/34531#34531).
I would be useful to store long queries such as this example, and edit them using fzfrepl to get a live preview.

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

No branches or pull requests

3 participants