|
|
Log in / Subscribe / Register

New features in the fish shell

New features in the fish shell

Posted Oct 3, 2020 17:51 UTC (Sat) by jo42 (subscriber, #59640)
In reply to: New features in the fish shell by marcH
Parent article: New features in the fish shell

Zsh has the helpful feature to filter history entries. Defining the function zshaddhistory to stop some commands going into the history file:

zshaddhistory()
{
# Don't save run-help and kill commands and commands run in bad-stuff
[[ $1 != (run-help *|kill *|bg|fg|cd|reboot|halt) && $PWD != $HOME/bad-stuff/* ]]
}


to post comments


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds