Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Linux 中,我可以做类似的事情history | grep abc,这只会调出以“abc”开头的命令。使用cmder中的Windows,我可以用命令调出history命令的历史记录,但是我找不到通过命令的前几个字母过滤掉它的方法。似乎没有 和 的等价|物grep。
history | grep abc
history
|
grep
cat %CMDER_ROOT%\config\.history | grep abc
在 Cmder::Cmder 会话历史中是一个 doskey 宏。不能使用管道传递宏的输出 | 但是您可以使用作为 doskey 宏内容的命令。
参考:https ://github.com/cmderdev/cmder/issues/1770