Partially Ignoring History in Fish Shell

Created: 2020-11-19T21:47:48-06:00

=> Return to the Index

Abbreviation

Abbreviating commands to they are always run with a preceding space, which avoids them being registered in history.

abbr --add nonsaved ' nonsaved'

Deletion after the fact

You can forget all history for particular commands:

history -delete 

An example was given having a function selectively delete history:

function delete-mplayer --on-event fish_postexec
string match -qr '^mplayer' -- $argv
and history delete --exact --case-sensitive -- (string trim -r $argv)
end

References

=> Request for HISTIGNORE equivalent was #wontfix'ed.via an alias (Github)
=> Workaround via an alias (Github)

Proxy Information
Original URL
gemini://iceworks.cc/z/ckhpq3h7f00004yisovef87e9.gmi
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
627.642205 milliseconds
Gemini-to-HTML Time
0.334487 milliseconds

This content has been proxied by September (ba2dc).