简体   繁体   中英

Ignoring certain file(s) in fish shell history

I have very recently started using fish shell on my mac. I have a certain (hidden) .files which I don't want to appear in the fish command completion (from history), since then they do not remain hidden at all :(.

Is there a way I can make fish ignore all commands involving these files to store to history?

Thanks in advance, Nikhil

If you start your sensitive commands with a space, that command will not be added to history. Other than hacking the fish sources, I don't know of a mechanism to programmatically filter commands before they're appended to the history.

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