Skip to content

external completion seems broken with fzf or input --list #18879

Closed

Description

@fdncred

Bug report form

  • I have done a basic search of the issue tracker to find any existing issues that are similar.
  • I have checked that my version is at least the latest stable release available via my installation method.

Describe the bug

Follow @woosaaahh 's Discord repro . Instructions below.

How to reproduce

Put this in a file called demo.nu

# launch with
# nu --no-config-file --execute 'source demo.nu'
#
export def generate-candidates [--fuzzy(-f), tokens: list<string>, ] {
    let pattern = $tokens | skip 1 | last
    let candidates = ls | where name has $pattern | get name
    if ($candidates | length) <= 1 or not $fuzzy {
        $candidates
    } else {
      # $candidates | input list --fuzzy | default $pattern | [$in]
        $candidates | to text | ^fzf --reverse | lines | default --empty [$pattern]  # <--- FZF
    }
}

const fuzzy = true

$env.config.show_banner = false
$env.config.completions.external.completer = {|tokens|
    generate-candidates --fuzzy=$fuzzy $tokens
}

export def tokenize [buffer: string, cursor: number] {
    let prefix = $buffer | str substring ..<$cursor
    let parsed = ast --flatten $prefix
    if $parsed != [] and ($parsed | last).span.end < ($prefix | str length) {
        $parsed.content ++ ['']
    } else {
        $parsed.content
    }
}

$env.config.keybindings ++= [
    {
        name: demo-keybinding
        modifier: control
        keycode: char_t
        mode: [emacs vi_insert vi_normal]
        event: {
            until: [
                {send: Menu, name: demo-menu}
                {send: MenuNext}
                {edit: Complete}
            ]
        }
    }
]
$env.config.menus ++= [
    {
        name: demo-menu
        marker: '| '
        only_buffer_difference: false
        type: { layout: columnar }
        style: {}
        source: {|buffer, cursor|
            let tokens = tokenize $buffer $cursor
            let span = {start: ($cursor - ($tokens | last | str length)), end: $cursor}
            generate-candidates --fuzzy=$fuzzy $tokens
            | wrap value
            | insert span $span
        }
    }
]

Start nushell like this: nu --no-config-file --execute 'source demo.nu'
The nvim <ctrl+t> part of the repo seems to work fine now.
The nvim <tab> part of the repro breaks badly.

  • Takes a while for the UI to pop up.
  • Once the fzf menu is there it's hard to select anything.
  • Once you get out of the fzf interface your nushell interface is hung. No typing at all. Looks like it's stuck in raw mode to me.

Now, enable input --list and disable fzf in the generate_candidates custom command.
The nvim <ctrl+t> repro works until you select something and are returned to the command line where you cannot backspace anymore.
The nvim <tab> seems to fall back to normal completions and not use input --list here. not sure that's right or if I'm doing something wrong.

Expected behavior

completions work

Configuration

key value
version 0.115.1
major 0
minor 115
patch 1
branch main
commit_hash ad3e613
build_os macos-aarch64
build_target aarch64-apple-darwin
rust_version rustc 1.95.0 (59807616e 2026-04-14)
rust_channel 1.95.0-aarch64-apple-darwin
cargo_version cargo 1.95.0 (f2d3ce0bd 2026-03-21)
build_time 2026-08-22T07:18:19
build_rust_channel release
allocator standard
features default, helix, lsp, mcp, network, plugin, rustls-tls, sqlite, trash-support
experimental_options example=false, dc-glob=true, reorder-cell-paths=true, pipefail=true, enforce-runtime-annotations=true, native-clip=true, cell-path-types=true
installed_plugins
nameversionlast_modified
biff0.1.02026-08-20T07:28:45
dt0.2.02026-08-20T07:32:34
emoji0.24.02026-08-20T07:34:59
exp0.1.02026-08-20T07:41:02
file0.27.02026-08-20T07:43:37
formats0.115.02026-08-15T16:32:21
gstat0.115.02026-08-15T16:33:09
inc0.115.02026-08-15T16:33:29
json_path0.25.02026-08-20T07:47:17
jwalk0.29.02026-08-20T07:53:01
parquet0.25.02026-08-20T07:58:43
polars0.115.02026-08-15T16:37:24
query0.115.02026-08-15T16:37:53
query_git0.25.02026-08-20T08:02:37
regex0.24.02026-08-20T08:05:53
strutils0.24.02026-08-20T11:00:01
to_gui0.1.02026-08-20T08:21:35
toon0.1.02026-08-20T08:24:22
tree0.1.02026-08-20T08:27:25

Activity

  1. added
    status:needs-triage
    on Aug 22, 2026
  2. changed the title [-]external completion seems broken[/-] [+]external completion seems broken with `fzf` or `input --list`[/+] on Aug 22, 2026
  3. fdncred commented on Aug 22, 2026

    @fdncred
    ContributorAuthor

    @philocalyst This seems very broken still. Any ideas?

  4. fdncred commented on Aug 22, 2026

    @fdncred
    ContributorAuthor

    Looks like we're still fighting over who owns the TTY. Ugh.

  5. added this to the v0.116.0 milestone on Aug 22, 2026
  6. modified the milestones: v0.116.0, v0.115.1 on Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:needs-triage

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions