Skip to content

Instantly share code, notes, and snippets.

@dantsec
Created May 3, 2023 22:28
Show Gist options
  • Save dantsec/0661227b62c0fc443c9fe87367e3019f to your computer and use it in GitHub Desktop.
Save dantsec/0661227b62c0fc443c9fe87367e3019f to your computer and use it in GitHub Desktop.
ZSH Trash Cleaner Plugin
#!/usr/bin/env zsh
# to deactivate double rm verification in zsh:
# echo "setopt rm_star_silent" >> ~/.zshrc
#
# to install:
# cd ~/.oh-my-zsh/custom/plugins
# mkdir trash && cd trash && (clone this raw)
# source trash.plugin.zsh
#
# edit ~/.zshrc
# plugins=(trash)
#
# source ~/.zshrc
#
# trash
trash() {
echo "Starting Cleaning..."
rm -rf ~/.local/share/Trash/*
mkdir ~/.local/share/Trash/{files,info}
echo "Cleaning finished!"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment