Skip to content

Pressing tab twice on alias causes nushell to panic and crash the terminal #8026

@charleschege

Description

@charleschege

Describe the bug

if I declare an alias in the config.nu file and try to use it in the terminal autocomplete

like alias = foo_bar baz

If i try to autocomplete the command and press tab twice nu shell panics and crashes the terminal. This is not a serious bug just encountered it when I accidentally pressed Tab key twice when doing autocomplete on the alias

I am on KDE Neon (Ubuntu 22.04).

I tried it on Konsole (default KDE terminal) and it panics with an error and crashed the terminal

I also tried it on alacritty terminal app and it panics with error message
thread 'main' panicked at 'Can't create a Span whose end < start, start=18446744073709523827, end=8', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/reedline-0.15.0/src/completion/base.rs:18:9 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

but it does not crash alacritty terminal

How to reproduce

  1. Create an alias in config.nu file alias = foo_bar baz
  2. Restart terminal / nu
  3. type foo_ and press Tab key to autocomplete
  4. Press Tab key again after autocomplete is done

Expected behavior

I expected nu not to crash

Screenshots

No response

Configuration

Sorry this returns an error, maybe I am missing a plugin or something

to: command not found
version: command not found
transpose: command not found

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions