Skip to content

Instantly share code, notes, and snippets.

@yeiichi
Created August 23, 2021 01:05
Show Gist options
  • Select an option

  • Save yeiichi/fec4430112394de3b0e28525064a478e to your computer and use it in GitHub Desktop.

Select an option

Save yeiichi/fec4430112394de3b0e28525064a478e to your computer and use it in GitHub Desktop.
Safe rm for zsh.
#!/bin/zsh
# Author: Eiichi YAMAMOTO
# Created: 20th August 2021
# Last Modified: 20th August 2021
# Description:
# Move a file or a directory to the Trash
mv $1 ~/.Trash/
echo $1 'has been moved to the Trash.\n'
return 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment