简体   繁体   English

如何从fish shell的命令历史记录中删除条目?

[英]How to delete entries from fish shell's command history?

In an attempt to unlock the screen, I have accidentally entered my password into a terminal running the fish shell.在尝试解锁屏幕时,我不小心将密码输入到运行鱼 shell 的终端中。

How can I remove it from the command history of fish again?如何再次将其从 fish 的命令历史记录中删除?

The solution does not need to be forensically secure.该解决方案不需要在取证上是安全的。 Traces left in backup files or on the drive are fine with me.备份文件或驱动器上留下的痕迹对我来说很好。 I just want to avoid eg my password accidentally popping up in a screen sharing session when I use fish's history while sharing.我只是想避免,例如,当我在共享时使用鱼的历史记录时,我的密码意外地出现在屏幕共享 session 中。 And I want to keep all the other commands in the history, because I often recall complicated commands from the history, sometimes editing them before reusing.而且我想将所有其他命令保留在历史记录中,因为我经常从历史记录中回忆复杂的命令,有时在重用之前对其进行编辑。

You want history delete .你想history delete That should ask you for a search term, show you matching entries and ask you for which to delete.这应该要求您输入搜索词,向您显示匹配的条目并询问您要删除的条目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM