Search code examples
autocompletefish

How can I search through fish completions?


I've noticed that sometimes, when there are multiple completion options, I get something like an input field, beneath the command line, where I can type and filter the completions. I'm not sure how I triggered it. Is there a key combination that I can press so that I have it available on demand?


Solution

  • To enter search mode directly, you can press shift-tab. You can also press tab until the highlight is in the pager, and then just start typing: that triggers searching too.

    Update March 2020: This changed in fish 3.0 here. There's now two ways to reveal the completion search:

    • Press ctrl s to toggle the search field while the pager is active
    • Press shift tab instead of tab to trigger completions with the search field shown immediately

    These correspond to pager-toggle-search and complete-and-search key bindings.