Created
November 30, 2009 02:27
-
-
Save gabrielmansour/245223 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
export CLICOLOR=1 | |
export LSCOLORS=ExFxCxDxBxegedabagacad | |
export LC_CTYPE=en_US.UTF-8 # for textmate svn bundle repo | |
# A "safer" rm; moves file to Trash instead | |
function trash() { | |
target="$HOME/.Trash/" | |
filepath=$(eval echo \$${#}) # trying to get last argument; don't know how to do so without using eval | |
file=$(basename "$filepath") | |
if [ -e "$target/$file" ]; then | |
# File with same same already exists in trash; give it a unique name | |
target="${target}/${RANDOM}_${file}" | |
fi | |
mv "$filepath" "$target" | |
} | |
alias "rm=trash" | |
alias 'rm!=/bin/rm' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment