TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Why does the `reset` command include a delay? (2017)

81 点作者 eklitzke大约 1 年前

5 条评论

dataflow大约 1 年前
I love the "It's harmless with a terminal emulator". I (obviously) get what they're saying, but you'd think making millions of people waste 3 seconds of their lives every time would be considered at least a modicum of harm.
评论 #39638572 未加载
评论 #39640573 未加载
fuzztester大约 1 年前
Back in the day, when the screen&#x2F;terminal was borked, due to <i>cat</i>ting a binary or other reasons, we used to do;<p><pre><code> stty sane Ctrl-J </code></pre> or other variants. It mostly worked. Last resort was to switch the terminal off and on, and&#x2F;or to kill the login shell from another terminal, IIRC.<p>See: man stty
评论 #39639281 未加载
DeathArrow大约 1 年前
&gt;Real (hardware) terminals need that.<p>I wonder who uses real terminals and for what.
评论 #39638878 未加载
评论 #39638426 未加载
评论 #39640433 未加载
评论 #39653963 未加载
评论 #39638523 未加载
评论 #39639181 未加载
aumerle大约 1 年前
To workaround it add the following to your shell&#x27;s rc file:<p>function reset { printf &#x27;\e]\e\\\ec&#x27; }<p>Uses the VT100 RIS escape code to ask the terminal to reset itself. But first it send an empty OSC escape to reset the terminals VT parser back to normal mode, so that the RIS escape code is parsed correctly. No need to depend on any external utilities like tput or the reset binary. This should work with any halfway decent terminal emulator.
charcircuit大约 1 年前
&gt;and since there&#x27;s no conventional way to tell the difference (and too hard to determine if some escape sequence might do a hardware-reset), reset assumes your terminal is real.<p>The TERM environmental variable can be used
评论 #39638492 未加载