Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tolerate -f and -rf input #7

Closed
zeke opened this issue May 30, 2014 · 4 comments
Closed

tolerate -f and -rf input #7

zeke opened this issue May 30, 2014 · 4 comments

Comments

@zeke
Copy link

zeke commented May 30, 2014

No description provided.

@MoOx
Copy link

MoOx commented May 30, 2014

👍 for this options

@sindresorhus
Copy link
Owner

Why?

@zeke
Copy link
Author

zeke commented May 31, 2014

I have an alias set up for the sake of muscle memory and reduced keystrokes:

alias rm=trash

trash removes recursively by default which is great, but I still have a habit of typing -rf. It would be nice if trash would just ignore those options and proceed with the trashing, instead of outputting usage:

/tmp » mkdir foo

/tmp » alias rm=trash

/tmp » rm -rf foo
Cross-platform command-line app for moving files and directories to the trash - A safer alternative to `rm`

Usage
  $ trash <path> [<path> ...]

Example
  $ trash unicorn.png rainbow.png

@sindresorhus
Copy link
Owner

Sorry, I don't want to enable that.

From readme:

You should not alias rm to trash however as that would break most scripts relying on rm behaviour. Rather use trash from the CLI and in your own scripts. I would also recommend reading my guide on safeguarding rm.

If you want something short, alias it to th or something ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants