"Until" keybinding with send empty menu should trigger next action
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 818
- Forks
- 249
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 30
Description
Describe the bug
I tried to stack completion_menu and historynextcomplete in until keybinding.
until: [
{ send: menu name: completion_menu }
{ send: historyhintwordcomplete }
{ send: menunext }
{ edit: complete }
]
Unfortunately, send: menu action doesn't know when the activated menu has no entry. Instead of return as failed, it shows it anyway. In turn, the historynextcomplete doesn't get called that often.
How to reproduce
- Modify tab keybinding to look as follow (mainly until stack):
...{ name: completion_menu modifier: none keycode: tab mode: [emacs vi_normal vi_insert] event: { until: [ { send: menu name: completion_menu } { send: historyhintwordcomplete } { send: menunext } { edit: complete } ] } } - Type something with possible hint:
cd ~ - Press tab
Expected behavior
The shell instead choose to complete the hint.
Screenshots
- Type something with possible hint
- Press tab
Configuration
$ version | transpose key value | to md --pretty
| key | value |
|---|---|
| version | 0.80.0 |
| branch | |
| commit_hash | |
| build_os | linux-x86_64 |
| build_target | x86_64-unknown-linux-gnu |
| rust_version | rustc 1.69.0 (84c898d65 2023-04-16) (built from a source tarball) |
| cargo_version | cargo 1.69.0 |
| build_time | 1980-01-01 00:00:00 +00:00 |
| build_rust_channel | release |
| features | default, zip |
| installed_plugins |
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the keybinding handling for the until stack and the send: menu name: completion_menu action. Reproduce the configuration with cd ~ and Tab, then verify that an empty menu action fails so the next history completion action runs.
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
- Mostly clear
- Newbie friendliness
- 45/100