Skip to content

Fuzzy completion panics on lines <Tab> #14904

Closed
@tmillr

Description

@tmillr

Describe the bug

It appears that some recent changes have introduced panics/OOB memory access attempt in the completion logic (the actual panic itself occurs in reedline, but I'm unsure of the cause). The bug (causing the panic) may be in nu, or reedline. It seems to only occur with fuzzy completion enabled. The bug is not present on v0.101.0.

How to reproduce

With latest commit of main checked-out, run:

RUST_BACKTRACE=full cargo run -- -n -e '$env.config.completions.algorithm = "fuzzy"'

Then type (note the space character):

lines <Tab>

...using Tab to trigger completion.

The panic also occurs on lines<Tab> .

Note that this panic also occurs with some other commands/command-lines as well (e.g. print<Tab> ).

Expected behavior

shouldn't panic, reedline shouldn't reload (losing entered command-line), etc.

Configuration

$env.config.completions.algorithm = "fuzzy"


key value
version 0.101.1
major 0
minor 101
patch 1
branch main
commit_hash 3f5ebd7
build_os macos-aarch64
build_target aarch64-apple-darwin
rust_version rustc 1.83.0 (90b35a623 2024-11-26) (built from a source tarball)
cargo_version cargo 1.83.0 (5ffbef321 2024-10-29)
build_time 2025-01-18 10:33:47 -08:00
build_rust_channel debug
allocator mimalloc
features default, sqlite, trash
installed_plugins

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageAn issue that hasn't had any proper look

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions