github / github/copilot-cli

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

Đang mở
#941 0 bình luận 8 reaction 0 người được giao Xem trên GitHub
area:input-keyboard
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

## 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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.