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

Add --no-input to hide the input section #4210

Merged
merged 9 commits into from
Jan 29, 2025
Merged

Add --no-input to hide the input section #4210

merged 9 commits into from
Jan 29, 2025

Conversation

junegunn
Copy link
Owner

@junegunn junegunn commented Jan 29, 2025

Close #2890
Close #1396

I can't think of many use cases. Maybe for really simple menus?

You can't type in queries in this mode, and the only way to trigger an fzf search is to use search(...) or transform-search(...) action.

# Click header to trigger search
fzf --header '[src] [test]' --no-input --layout reverse \
    --header-border bottom --input-border \
    --bind 'click-header:transform-search:echo ${FZF_CLICK_HEADER_WORD:1:-1}'
image

Issues

  • Any action that changes the query is simply ignored.
  • Should we respect the initial query? e.g. fzf --no-input --query a
    • This may give the wrong impression that the "query" is still respected in this mode
    • The same can be done using start event. i.e. fzf --no-input --bind start:search:a

Close #2890

I can't think of many use cases. Maybe for really simple menus?

You can' type in queries in this mode, and the only way to trigger an
fzf search is to use `search(...)` action.
@junegunn junegunn self-assigned this Jan 29, 2025
@junegunn junegunn merged commit 6c0ca4a into master Jan 29, 2025
5 checks passed
@junegunn junegunn deleted the no-input branch January 29, 2025 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hide search interface in --phony mode Is it possible to hide prompt ?
1 participant