andreafrancia / trash-cli

Command line interface to the freedesktop.org trashcan.
GNU General Public License v2.0
3.53k stars 177 forks source link

Add a way to trash from stdin #345

Open iTrooz opened 1 month ago

iTrooz commented 1 month ago

Is your feature request related to a problem? Please describe. I often use my trash for things categorised as "I probably won't ever need this again, but I'll quickly store it just in case". This often applies to text I have stored in my clipboard

Describe the solution you'd like A way to trash text easily, without manually creating a file before

An implementation could be making trash-put - or trash-put --stdin read from stdin. The - character has already been used like this: https://stackoverflow.com/a/8045495

Describe alternatives you've considered Creating a file with nano and trashing it instantly

Additional context The name of the file trashed could be trashcli_stdin_<random letters>

iTrooz commented 1 month ago

I'd be ready to submit a PR if you agree with the idea

andreafrancia commented 2 weeks ago

I can't pre-approve PR, you need that functionality go ahead and implement it. Implement for you not for trash-cli. If the design is sound, the use case useful, used or requested I will pull it by myself.