nushell / nushell/reedline

"Until" keybinding with send menunext/menuprev and single entry should trigger next action

Open
#604 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement line editor
Dominant language
Rust
Stars
818
Forks
249
Avg merge
4d 14h
Merged PRs (30d)
30

Description

Related problem

I tried to stack menunext and complete in until keybinding.

        until: [
          { send: menu name: completion_menu }
          { send: historyhintwordcomplete }
          { send: menunext }
          { edit: complete }
        ]

Unfortunately, send: menunext action doesn't know when the activated menu has only single entry. Instead of return as failed, it act with no effect. It is smarter to return as failed and thus executing complete action.

Describe the solution you'd like

Make menunext and menuprev return Inapplicable when only single item menu is currently active.

Describe alternatives you've considered

None

Additional context and details

Related: https://github.com/nushell/reedline/issues/603

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search for the menunext and menuprev action implementations, then read how send actions report Inapplicable and review related issue #603 for context. Done when both actions return Inapplicable for an active menu with a single item, allowing the until sequence to continue to complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.