简体   繁体   中英

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.

How can I remove it from the command history of fish again?

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. 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 . That should ask you for a search term, show you matching entries and ask you for which to delete.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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