Skip to content

fuzzy-history menu is blatantly incorrect #1131

@alecStewart1

Description

@alecStewart1

The following is used for a fuzzy completion menu:

  {
    name: fuzzy_history
    modifier: control
    keycode: char_h
    mode: [emacs, vi_normal, vi_insert]
    event: {
      send: executehostcommand
      cmd: "commandline (
        history
        | par-each { |it| $it.command }
        | uniq
        |  reverse
        | input list --fuzzy
          $'Please choose a (ansi magenta)command for history(ansi reset):'
      )"
    }
  }

However you cannot give commandline a positional argument:

~> Error: nu::parser::extra_positional                                                                                                                                                                                                                       06/09/2025 07:42:57 PM

  × Extra positional argument.
   ╭─[entry #27:1:13]
 1 │ ╭─▶ commandline (
 2 │ │           history
 3 │ │           | par-each { |it| $it.command }
 4 │ │           | uniq
 5 │ │           |  reverse
 6 │ │           | input list --fuzzy
 7 │ │             $'Please choose a (ansi magenta)command for history(ansi reset):'
 8 │ ├─▶       )
   · ╰──── extra positional argument
   ╰────
  help: Usage: commandline

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions