MoonshotAI / MoonshotAI/kimi-cli

命令输入 UX 问题:需要敲两次回车才能执行命令 || UX problem: You need to hit Enter twice to execute the command

Open
#1,682 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
11.4k
Forks
1.3k
Avg merge
9h 47m
Merged PRs (30d)
2

Description

问题描述

在使用命令补全功能时,用户需要敲两次回车才能执行命令,这与其他 CLI 工具(如 Claude Code)的行为不一致,严重影响使用体验。

复现步骤

  1. 在输入框输入命令的缩写,如 /cl
  2. 敲回车

预期行为:

  • 命令自动补全为 /clear直接执行(参考 Claude Code 的行为)
  • 用户只需要敲一次回车

实际行为:

  • 命令补全为 /clear不执行
  • 用户需要再敲一次回车才能执行
  • 总共需要敲两次回车

对比

CLI 工具 输入 操作 结果
Claude Code /cl 敲回车 × 1 ✅ 直接执行 /clear
kimi-cli /cl 敲回车 × 2 ❌ 需要两次回车才能执行

影响

这个问题严重影响使用效率和体验:

  • 打断了用户的操作流程
  • 与用户的预期行为不符(敲回车 = 执行命令)
  • 与业界其他 CLI 工具的行为不一致

建议

建议参考 Claude Code 等工具的实现:

  • 用户敲回车时,如果有命令补全,应该自动补全并立即执行
  • 不需要用户二次确认

Problem description

When using the command completion function, the user needs to press Enter twice to execute the command. This is inconsistent with the behavior of other CLI tools (such as Claude Code) and seriously affects the user experience.

Reproduction steps

  1. Enter the abbreviation of the command in the input box, such as /cl
  2. Press Enter

Expected Behavior:

  • Command auto-completion is /clear and direct execution (refer to Claude Code's behavior)
  • Users only need to type enter once

Actual behavior:

  • Command completion is /clear but not executed
  • The user needs to press Enter again to execute
  • You need to hit Enter twice in total**

Compare

CLI Tools Input Actions Results
Claude Code /cl Hit Enter × 1 ✅ Directly execute /clear
kimi-cli /cl Press Enter × 2 ❌ Two press Enters are required to execute

Impact

This problem seriously affects usage efficiency and experience:

  • Interrupt the user's operation flow
  • does not match the user's expected behavior (hit Enter = execute command)
  • Inconsistent behavior with other CLI tools in the industry

Suggestions

It is recommended to refer to the implementation of tools such as Claude Code:

  • When the user presses Enter, if there is a command completion, it should be automatically completed and executed immediately
  • No need for the user to confirm the command input twice

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

Start by locating the CLI command-completion flow and the Enter-key handling for abbreviated commands such as /cl. Reproduce the issue, then verify that one Enter both completes /cl to /clear and executes it, while preserving normal command input behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.