microsoft / microsoft/terminal

Send EOF when CTRL+D is pressed in CMD or PowerShell. (Alias for CTRL+Z)

Open
#14,764 6 comments 6 reactions 0 assignees View on GitHub
Area-Server Issue-Feature Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

# Description of the new feature/enhancement

Send EOF to Windows programs when CTRL+D is pressed.
Essentially, make CTRL+D an alias for CTRL+Z, to mirror the shortcut from Linux.

This would make exiting from cross-platform REPLs such as Python more consistent across platforms.
For example, on Linux I can exit a Python REPL with CTRL+D, but on Windows I have to use CTRL+Z, ENTER.
There was an issue [requesting this functionality in the Python REPL](https://github.com/python/cpython/issues/63289) itself, but it was closed as they didn't want to go against the OS norms.

# Proposed technical implementation details (optional)

When a user presses CTRL+D in CMD or PowerShell, it should send the same ~~signal~~ EOF to the running program that is currently sent when CTRL+Z is pressed.

Contributor guide

Open the contributing guide

Research direction

Start by tracing how CMD and PowerShell currently handle CTRL+Z and EOF input. Compare that behavior with CTRL+D in a cross-platform REPL such as Python. Done means pressing CTRL+D in either Windows shell sends the same EOF behavior as CTRL+Z followed by ENTER, without changing existing CTRL+Z handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, powershell
Domain
cli, operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.