Skip to content

Commit

Permalink
rm=rm -i. safety first.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Mar 17, 2015
1 parent eab7c9a commit 634b1ce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .aliases
Expand Up @@ -7,6 +7,10 @@ alias .....="cd ../../../.."
alias ~="cd ~" # `cd` is probably faster to type though
alias -- -="cd -"


alias rm="rm -i"


# setting up the sublime symlink
ln -sf "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ~/bin/subl

Expand Down

2 comments on commit 634b1ce

@sindresorhus
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep in mind that the above doesn't apply to scripts, only the interactive shell. So you're not safe yet.

Some other ways you can safeguard rm: https://github.com/sindresorhus/guides/blob/master/how-not-to-rm-yourself.md#safeguard-rm

@amboy00
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you ssh to another machine, does this alias work there too, or will you have to remember that you're dealing with the real rm?

Please sign in to comment.