Code Review request for the trash-cli project

A

Andrea Francia

The trash-cli project is a opensource implementation of the
FreeDesktop.org Trash Specification that provides a command line
interface to manage the trashcan.

It's provide the following commands:
* trash-put trashes files and directories.
* trash-empty empty the trashcan(s).
* trash-list list trashed file.
* trash-restore restore a trashed file.

It is written in python and its sources are available at

http://code.google.com/p/trash-cli/source/browse/#svn/trunk

I'm the main developer and I'm not so good in Python as I would be.

Would you review my software and point out the problems you see?

The review comments can be written using the code-review facilities of
google code. You need only to double click the line of code where you
want add a comment.

Patches are also welcome.

Thank you.
 
A

Andrea Francia

Dotan said:
2009/1/6 Andrea Francia


I don't know about the code, but would there be a reason _not_ to
alias rm, rmdir to this program?

Actually the trash-put command accept all the options of GNU rm in order
allows user doing alias rm='trash-put', but it does not accept yet some
GNU rmdir options (--ignore-fail-on-non-empty, -p, --parents).

A enhancement issue about accepting rmdir options was added to the tracker.
I see that it is GPL, so this would
be a great addition to any Linux distro.

It's available in some distro but many distro uses a very old version,
to gain all the advantages of the latest development version you can use:

easy_install trash-cli

The easy_install command is provided by the python-setuptools package.
 
S

Steven D'Aprano

I don't know about the code, but would there be a reason _not_ to alias
rm, rmdir to this program? I see that it is GPL, so this would be a
great addition to any Linux distro.

I sure as hell don't want rm to move files to the trash. If I rm
something, I want it *gone*.

I do want a *different* command for moving files to the trash. But
absolutely not rm.

Of course, if anyone wants to alias rm in their own shell, they're
welcome to. That's what the alias command is for.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top