Skip to content

tab completion on suggestions stuck on the second element #14152

@maxim-uvarov

Description

@maxim-uvarov

Describe the bug

When I hit tab, I always get the second completion result, though shift+tab works correctly. The problem is with paths completions and with commands completions.
With the history menu ctrl + r there is no problem.

It's a strange bug that appeared only in 0.99.x.
Before that on the same config tab for given cases worked correctly.

Screen.Recording.2024-10-22.at.6.04.19.PM.mov

On the same machine in nu -n tab works normally.

On the discord @fdncred pointed out these two commits:

I tried to disable and rename the config shortcut (below), but with no success.

    {
        name: completion_next_menu
        modifier: none
        keycode: tab
        mode: [emacs vi_normal vi_insert]
        event: {
            until: [
                { send: menu name: completion_menu }
                { send: menunext }
                { edit: complete }
            ]
        }
    }

How to reproduce

enter some file path - click tab more than once.
@fdncred wasn't able to reproduce the bug both on windows and on Mac.

Expected behavior

I expect tab to scroll through selections

Configuration

key value
version 0.99.1
major 0
minor 99
patch 1
branch
commit_hash 8812072
build_os macos-aarch64
build_target aarch64-apple-darwin
rust_version rustc 1.79.0 (129f3b996 2024-06-10)
rust_channel 1.79.0-aarch64-apple-darwin
cargo_version cargo 1.79.0 (ffa9cf99a 2024-06-03)
build_time 2024-10-22 18:30:13 -03:00
build_rust_channel release
allocator mimalloc
features default, sqlite, trash
installed_plugins polars 0.99.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    A:completionsIssues related to tab completioncategory:bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions