【问题标题】:Is there a way to filter the command history in Windows using cmder?有没有办法使用cmder过滤Windows中的命令历史记录?
【发布时间】:2021-01-22 16:20:58
【问题描述】:

在 Linux 中,我可以执行 history | grep abc 之类的操作,而这只会显示以“abc”开头的命令。在cmder中使用Windows,我可以用history命令调出命令的历史记录,但是我找不到通过命令的前几个字母来过滤它的方法。似乎没有 |grep 的等价物。

【问题讨论】:

    标签: windows grep cmder


    【解决方案1】:

    cat %CMDER_ROOT%\config\.history | grep abc

    在 Cmder::Cmder 会话历史中是一个 doskey 宏。不能使用管道传递宏的输出 |但是您可以使用作为 doskey 宏内容的命令。

    参考:https://github.com/cmderdev/cmder/issues/1770

    【讨论】:

      猜你喜欢
      • 2012-12-11
      • 2020-12-16
      • 1970-01-01
      • 1970-01-01
      • 2013-09-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多