vercel / vercel/hyper

Clear command (CMD + K) is inconsistent with `clear` binary

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

Nobody has claimed this yet.

🎨 Type: Enhancement
Dominant language
TypeScript
Stars
44.7k
Forks
3.6k
Avg merge
21m
Merged PRs (30d)
1

Description

Issue

I have a multi-line bash prompt (two lines). If I run clear I see this:


~/Code
❯ 

If I press CMD + K I see this:

I'm not totally sure what's happening… what I'd expect to see in both scenarios is this:

~/Code
❯ 

But with the binary I get an extra space at the top and with the shortcut the first line of my prompt is eaten. Maybe this is normal and expected, though, because when I try this in Terminal.app I get the same results. If this isn't a bug, what am I misunderstanding? Why are they different, and why does neither do what seems logical?

Contributor guide

No contributing guide indexed for this repository

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 reproducing the report on macOS with a two-line bash prompt, comparing the clear binary with CMD+K in Hyper and Terminal.app. Determine whether the differing blank-line and prompt behavior is an application bug or expected terminal behavior; done means the behavior is either made consistent or clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.