Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Renaming the trash command of trash-cli?

I'm the developer of the trash-cli project.

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

Ideally trash-cli provides these commands:

  • trash (trashes files and directories)
  • trash-empty (empty the trashcan(s))
  • trash-list (list trashed files)
  • trash-restore (restore a trashed file)

But I must rename the 'trash' command because the name is too generic to let the trash-cli added in Fedora (see full discussion here)

I chose the 'trash' name because I think is the better name you could use (is short and intuitive), but, as I stated before, I can't use this name.

In any case I think a good choice keep the trash-* form because it exploit the shell TAB completion.

In the beginning I was persuaded to rename the 'trash' command in 'trash-file' but I don't like it very much, and as Christoph Bloch pointed out:

My arguments against "trash-file": * It is not intuitive and therefore unnecessarily difficult to memorise. * It is unnecessarily long. * Every change in the name of programs causes confusion, so the new solution should be a clear improvement (which it isn't). * It is even wrong: Directories can be trashed, too.

Just "trash" was much better.

I collected some ideas for renamng the 'trash' command. Would you like help me to choose the best one? Do you know a better name?

Here the alternatives (some of them are ugly, I know it, but maybe they help you to find a better name) :

  • trash-put
  • trash-put-in
  • trash-trash
  • trash-throw
  • trash-f
  • trash-rm
  • trash-recycle
  • trash-do
  • trash-to

  • trash-

  • trash-now
  • trash-!
  • trash2
  • trash
  • trashit

  • trash-item

  • trash-entry
  • trash-elem
  • trash-path
  • trash-data

  • trash-this

  • trash-it
  • trash-that
like image 445
Andrea Francia Avatar asked Dec 31 '22 06:12

Andrea Francia


2 Answers

Perhaps go the 'UNIX way' and adopt as short a name as possible.

tf? - although the objection that it also handles directories remains.

Note that the word 'trash' is perceived in Britain to be an Americanism. I'm not sure about other English speaking countries. Apple clearly didn't care about non-American sensibilities when they named the Trash Can. I guess Red Hat didn't either (or just followed Apple's cue).

like image 89
slim Avatar answered Jan 05 '23 05:01

slim


Why not have a single command with different arguments for the actions you want?

trash list
trash empty
trash restore {<file>}*

I realize this goes against the UNIX-way in the strictest sense, however, they are all operations on a single object, so I'd make the argument there should be one command for this rather than a group of commands.


As far as renaming "trash" to something else, really? Wow, I think "trash" is actually pretty intuitive compared to the alternatives. Some alternatives:
  • trashcan, or simply tc
  • wastebasket, or simply wb
like image 28
paxos1977 Avatar answered Jan 05 '23 05:01

paxos1977