Commit bbbe3f24 authored by Klaatu's avatar Klaatu
Browse files

updated readme

parent 7ad917cd
......@@ -16,20 +16,41 @@ now on, you'll never have to go through that ever again!
Trashy is a simple shell script that introduces the idea of a trash
can for the command line. Meaning that you can issue this command:
trash foo
trash foo bar
and foo will be moved to ~/.trash
and the files 'foo' and 'bar' will be moved to your system trash.
or...
trash foo\ bar
and the file 'foo bar' will be moved to your system trash.
Simple as that. When you're really really sure that everything in
your .trash folder wants to be nuked out of existance, then you can
your Trash wants to be nuked out of existence, then you can
issue the command:
empty
trash --empty
and your system trash will be emptied.
3. System Trash
Trashy defines a "system trash" on Linux, BSD, and Solaris-based
operating systems in accordance to the Open Desktop standard:
~/.local/share/Trash
On systems that do not use a desktop, trashy simply creates a ~/.trash
folder (unless you sometimes use a desktop, in which case your
desktop's tash will be continued to be used).
and your .trash will be emptied.
On systems that do have a desktop but do not follow the Open Desktop
standard, trashy tries to conform with what they do use. If all else
fails, ~/.trash is used.
3. Aliases
4. Aliases
To help myself ease into the concept of the trash command, I literally
had to alias rm to trash for a while. This works quite well, in
......@@ -49,7 +70,7 @@ alias helps. To have an alias installed along with trashy, simple
uncomment the alias block in the install.sh script.
4. Ditching the Alias
5. Ditching the Alias
Eventually it will become tedious to you to work around the trash
command every time you really really do want to rm a file. At that
......@@ -64,58 +85,35 @@ trash to move to a trash bin. It WILL take a while, if you're used to
rm, so do account for that.
5. System Integration
I would love to integrate trashy with the freedesktop.org Trash
http://www.ramendik.ru/docs/trashspec.html
There is an easy way to hack into the System Trash, though.
On KDE4 or Gnome3, simply edit the trash script in a text
editor; the very first line after the GPLv3 notice sets the $BASKET
variable to ~/.trash, so change that to ~/.local/share/Trash/files
and then install.
You can also make that change post-install, but you'll need
root permissions.
6. Why trashy?
Trashy is BASHy, meaning that it's really really portable. It can be
installed easily on GNU Linux, freeBSD, and Mac OS X. Probably more,
but these are the systems I have tried it on. In all three cases,
there are no real dependencies (except BASH on BSD but that's not so
terribly uncommon).
installed easily on GNU Linux, freeBSD/netBSD/DragonFlyBSD, Illumos,
and Mac OS X. Probably more, but these are the systems I have tried
it on. In all three cases, there are no real dependencies (except
BASH on BSD but that's not so uncommon).
It's simple, but it works well and it works on lots of systems.
That's good enough for me.
Similar projects do exist. The one I know of uses Python and has some
really neat and fancy features and probably already conforms to Free
Desktop specs. Check it out if you're on a Linux box or if you don't
mind a bit of set-up on non Free Desktop UNIX systems.
Similar projects do exist. The one I know of uses Python and has some
really neat and fancy features. Check it out if you're on a Linux box
or if you don't mind a bit of set-up on non Free Desktop UNIX systems.
http://code.google.com/p/trash-cli/
7. Bugs
Yes, there is one glaring horrible bug: trashy does not support
files with a SPACE in its name. You can try to fool trashy with
quotes and wildcard characters, but I can't iron it out. I can
give you support for wildcards. Or I can give you support for
spaces. But not both.
Since spaced filenames are uncommon on my systems and on many
production servers that I've seen, or on any web dev's system,
I opted to drop support for spaces. This means we get to keep
support for wildcard characters and the ability to trash more
than one file at a time. Rather a nice feature, imho.
I've ironed a lot of them, actually. Trashy has gotten a lot better
since its original implementation. I am sure there are many bugs that
could be revealed under the right testing circumstances, so give it a
go and let me know what you find. I can't promise I'll fix them
immediately, but they'll definitely make my list.
So if you know the secrets to supporting multiple args, some with
spaces in the names, others with wildcards, then do submit a patch.
More features are still planned; notably, a built in --restore
function, and better handling of files that are not in one's home
folder.
I can generally be contacted via klaatu
at the domain of member dot fsf
dot org.
I can generally be contacted via klaatu at the domain of
member dot fsf dot org.
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment