blinksh / blinksh/blink

Keyboard Interrupt Does not Clear Line in Blink Shell

Open
#2,040 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Swift
Stars
6.9k
Forks
746
PR merge metrics
No merged PRs in 30d

Description

### Checklist

- [x] Using latest version on the [App Store](http://itunes.apple.com/app/id1156707581)
- [x] Read the [docs](http://blink.sh/docs/)
- [x] Searched for [existing GitHub issues](https://github.com/blinksh/blink/issues)

### Configuration

Blink Version: `v17.3.0.916`
iPadOS: `17.6.1`

### Describe the bug

Keyboard Interrupt (control-c) does not clear the prompt in blink shell. Instead, return must be pressed after control-c to get a blank prompt.

Ideally, control-c would behave the same in blink prompt as in bash--throwing you onto a new empty prompt line without the need to press enter.

Additionally, control-d doesn't delete the subsequent character like a linux readline prompt (with standard bindings) or a macOS/iPadOS text field.

![image](https://github.com/user-attachments/assets/5560a89e-4aab-4fc4-bd93-66c5ac6c7459)
![image](https://github.com/user-attachments/assets/932e3edd-e15e-428e-8490-28791f3b4b9e)
![image](https://github.com/user-attachments/assets/bce1ed4c-94e6-41e9-b14e-76b0800815af)

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the control-c and control-d behavior on the stated Blink and iPadOS versions, then locate the shell prompt's keyboard-input handling. The fix is complete when control-c produces a new empty prompt without pressing Return and control-d deletes the following character as described; verify both behaviors on the affected platform.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell, swift
Domain
cli, mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.