清除 NodeJS REPL 控制台的命令历史记录 [英] Clear command history of NodeJS REPL Console

查看:56
本文介绍了清除 NodeJS REPL 控制台的命令历史记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 NodeJS 4.2.1 版

I am using NodeJS version 4.2.1

我想知道用于完全清除 NodeJS REPL 控制台历史记录的命令,以便在按下向上或向下箭头键时不会显示以前执行的命令.

I want to know the command for clearing the NodeJS REPL console history completely so it doesn't show previously executed commands when Up or Down arrow keys are pressed.

有什么建议吗?

推荐答案

答案其实很简单:)

在 Windows 上(我的版本是 10):

On Windows (my version is 10):

  1. 转到用户文件夹:cd %userprofile%
  2. 名为 .node_repl_history 的空文件(在我的情况下使用 vim 文本编辑器)或者您可以简单地运行:echo.>.node_repl_history 会产生同样的效果.
  1. go to user folder: cd %userprofile%
  2. empty file named .node_repl_history (in my case with vim text-editor) OR you can simple run: echo. > .node_repl_history and it will have same effect.

这篇关于清除 NodeJS REPL 控制台的命令历史记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆