🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

trash

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trash - npm Package Compare versions

Comparing version

to
0.1.2

19

cli.js

@@ -15,9 +15,11 @@ #!/usr/bin/env node

function help() {
console.log(pkg.description);
console.log('');
console.log('Usage');
console.log(' $ trash <path> [<path> ...]');
console.log('');
console.log('Example');
console.log(' $ trash unicorn.png rainbow.png');
console.log([
pkg.description,
'',
'Usage',
' $ trash <path> [<path> ...]',
'',
'Example',
' $ trash unicorn.png rainbow.png'
].join('\n'));
}

@@ -41,4 +43,5 @@

if (err) {
throw err;
console.error(err.message);
process.exit(1);
}
});
{
"name": "trash",
"version": "0.1.1",
"version": "0.1.2",
"description": "Cross-platform command-line app for moving files and directories to the trash - A safer alternative to `rm`",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -59,4 +59,16 @@ # ![trash](https://cdn.rawgit.com/sindresorhus/trash/3aa70853f1efb58d0d2512e32d617d246c88953c/media/logo.svg)

## Tip
Add `alias t=trash` to your `.zshrc`/`.bashrc` to reduce typing: `$ t unicorn.png`.
## FAQ
### But I can do the same thing with `mv`
Not really. The `mv` command isn't cross-platform and moving to trash is not just about moving the file to a "trash" directory. On all OSes you'll run into file conflicts. The user won't easily be able to restore the file. It won't work on an external drive. The trash directory location varies between Windows versions. For Linux there's a whole [spec](http://www.ramendik.ru/docs/trashspec.html) you need to follow. On OS X you'll loose the [Put back](http://mac-fusion.com/trash-tip-how-to-put-files-back-to-their-original-location/) feature.
## License
MIT © [Sindre Sorhus](http://sindresorhus.com)