Created
January 17, 2022 17:42
-
-
Save d-amend/4a30ee5a2d4c2df6f1e9d0b73011ff44 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*BSD/Darwin (macOS): | |
LC_ALL=C sed -i '' '/porn/d' $HISTFILE | |
Linux (GNU sed): | |
LC_ALL=C sed -i '/porn/d' $HISTFILE | |
This will remove all lines matching "porn" from your $HISTFILE. | |
With setopt HIST_IGNORE_SPACE, you can prepend the above command with a space character to prevent it from being written to $HISTFILE. | |
Source: https://stackoverflow.com/a/13661794 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment