github / github/copilot-cli

Add undo support (Ctrl+_ / Cmd+Z) to input line editor

未关闭
#941 0 条评论 8 个 reaction 已指派 0 人 在 GitHub 查看
area:input-keyboard
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

## Summary

The Copilot CLI input line editor currently lacks undo functionality. Standard readline/terminal behavior supports `Ctrl+_` for undo, but this doesn't work in Copilot CLI because the CLI implements its own input
handling.

## Current behavior

- `Ctrl+_` does nothing in Copilot CLI
- No undo capability exists for typed input
- Other standard readline shortcuts work (Ctrl+a, Ctrl+e, Ctrl+w, Ctrl+u, Ctrl+k)

## Expected behavior

- `Ctrl+_` should undo the last edit (standard readline undo)
- Ideally maintain an undo history for multiple undo operations

## Use case

When typing longer prompts, accidentally deleting text or making typos requires retyping from scratch. Undo support is a standard text editing feature that would significantly improve the input experience.

## Environment

- macOS + iTerm2
- Copilot CLI version: 0.0.377
- Shell: zsh

## Additional context

`Ctrl+_` works correctly in a clean terminal (readline handles it), confirming this is specific to Copilot CLI's custom input handling.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。