Skip to content

control-g is different in Fish and Bash integrations #996

@smolin

Description

@smolin

Describe the bug
^g in the default Bash integration shows all cheat matching the typed string, so if you type "bookm^g" you'll get a selector to choose from cheats containing "bookm".

In the Fish integration, you only get one hit.

To Reproduce
Steps to reproduce the behavior:

  1. start Fish shell
  2. activate the integration, with 'navi widget fish | source'
  3. type a string, followed by ^g
  4. observe that only a single match is returned

Expected behavior
All cheats matching the string show

Screenshots
If applicable, add screenshots to help explain your problem.

Versions:

  • OS: MacOS 15.6.1 on M4
  • Shell Version
% /opt/homebrew/bin/bash --version
GNU bash, version 5.3.3(1)-release (aarch64-apple-darwin24.4.0)
Copyright (C) 2025 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
!563 +0 @1643 j0 ~  git::
% fish --version
fish, version 4.0.8

Additional context
I fixed the problem for myself by commenting out a section of the integration function:

    # navi widget fish | source
    function _navi_smart_replace
        set --local query (commandline --current-process | string trim)
        # if test -n "$query"
        #     set --local best_match (navi --print --query "$query" --best-match)
        #     if test -n "$best_match"
        #         commandline --current-process $best_match
        #         return
        #     end
        # end
        set --local candidate (navi --print --query "$query")
        if test -n "$candidate"
            commandline --current-process $candidate
        end
    end
    bind \cg _navi_smart_replace
    bind --mode insert \cg _navi_smart_replace

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions