Skip to content

Unnecessary completion request when updating the common prefix to the command line. #964

@blindFS

Description

@blindFS

From nushell/nushell#16860, we can tell that there's something to optimize.

Steps to reproduce

def completion [] {
  ['"first item"' '"second item"']
}

export def foo [c: string@completion] {
  print $c
}
  1. foo <tab> returns those 2 items with the common prefix "
  2. Reedline updates the line text to foo "
  3. During menu redraw (maybe?), the completion results are updated to those for the new text foo ", which is totally unnecessary in theory.

It could potentially be a dealbreaker for time costing external completer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-CompletionsArea: Tab completion and inline hint completionsP-lowLow Priority: Implementation would be nice to have but does not severely impact quality of lifebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions