Skip to content

Instantly share code, notes, and snippets.

@y13i
Created November 20, 2024 07:03
Show Gist options
  • Save y13i/d0286d9969f5c676f01e78256c3cbfc5 to your computer and use it in GitHub Desktop.
Save y13i/d0286d9969f5c676f01e78256c3cbfc5 to your computer and use it in GitHub Desktop.
history警察です
# 誤った歴史は削除する!!
sed -i '' '/AWS_SECRET/d' $HISTFILE
# そもそも記録させない
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