kingToolbox / kingToolbox/WindTerm
对于cmd/powershell会话,clear清屏不能重置命令行数 | For cmd/powershell sessions, clear screen cannot reset the number of command lines
- Dominant language
- C
- Stars
- 32.3k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
系统环境:Windows10 22H2
软件版本:WindTerm 2.5.0
问题描述:
对于ssh会话,clear可以将历史操作记录清空,行号清零。但当使用cmd或powershell会话时,cls或clear命令虽然也能清屏,但行号不会重置,而是继续累加。想要重置命令行号只能彻底关闭当前会话再新建一个。
For ssh sessions, clear can clear the historical operation records and clear the line numbers to zero. But when using cmd or powershell session, although the cls or clear command can also clear the screen, the line number will not be reset, but will continue to accumulate. If you want to reset the command line number, you can only completely close the current session and create a new one.

而直接win+r运行cmd或者powershell,使用clear清屏命令是可以清空并重置操作记录的,所以应该不是原生命令不支持?
And directly run cmd or powershell with win+r, and use the clear screen command to clear and reset the operation records, so it shouldn't be that the native command is not supported? Is that a problem?

Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the behavior in a Windows cmd or PowerShell session and compare it with the SSH session behavior described in the report. Trace how clear or cls is handled for these session types; done means clearing the screen also resets the command-line number without closing and recreating the session.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100