Created
November 20, 2024 07:03
-
-
Save y13i/d0286d9969f5c676f01e78256c3cbfc5 to your computer and use it in GitHub Desktop.
history警察です
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
# 誤った歴史は削除する!! | |
sed -i '' '/AWS_SECRET/d' $HISTFILE |
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
# そもそも記録させない | |
function zshaddhistory() { | |
emulate -L zsh | |
if [[ $1 = *"AWS_SECRET_ACCESS_KEY"* ]] ; then | |
return 1 | |
fi | |
return 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment