linux - 如何过滤掉 tcsh 历史记录中的相同命令
问题描述
我正在使用 tcsh。但是对存储在历史文件中的相同命令感到恼火。我必须使用多次向上箭头来绕过相同的命令,非常不方便。任何人都可以提供一些帮助来解决这个不便。
解决方案
有这个histdup
设置;来自tcsh(1)
:
histdup (+)
Controls handling of duplicate entries in the history list. If
set to `all' only unique history events are entered in the
history list. If set to `prev' and the last history event is
the same as the current command, then the current command is
not entered in the history. If set to `erase' and the same
event is found in the history list, that old event gets erased
and the current one gets inserted. Note that the `prev' and
`all' options renumber history events so there are no gaps.
推荐阅读
- vb.net - 使用类型来访问属性而不是具体实例
- windows - 如何使用 unix 类型的换行符克隆 github repo
- r - 如何删除欺骗和替换列变量
- c# - 如何创建一个类来帮助我记录我的应用程序用户活动?(干净的编码和代码重构问题)
- java - 错误:无法从“JavaVersion.VERSION_1_8”确定 Java 版本
- function - 定义一个使用 min() 的函数
- google-apps-script - 使用脚本根据下拉选择设置值
- python - Checkbutton 不会被设置为变量值
- c# - 根据其他属性更新对象属性
- javascript - 无法获取 div 的最后一个孩子