oberblastmeister / trashy

a cli system trash manager, alternative to rm and trash-cli
Apache License 2.0
362 stars 13 forks source link

Feature request: --verbose flag #38

Open cmessias opened 2 years ago

cmessias commented 2 years ago

Hi there, I've been using this program for the last couple of weeks and I've been loving it so far. One of the things I think is missing from rm is a --verbose flag.

I think this flag is super useful for interactive use in the terminal, and I think it would be useful here too. In rm it simply prints the removed files after the fact, like so:

$ touch file file2 file3
$ rm --verbose file*
removed 'file'
removed 'file2'
removed 'file3'

In trashy, I think it could be done similarly, or to maintain consistency with the other subcommands, a confirmation prompt could be used, like how it is already done with the empty subcommand:

$ trash empty file
3 items will be emptied
╭───┬────────────────┬──────────────────────────╮
│ i │ Time           │ Path                     │
├───┼────────────────┼──────────────────────────┤
│ 2 │ now            │ /home/caio/desktop/file  │
│ 1 │ now            │ /home/caio/desktop/file3 │
│ 0 │ now            │ /home/caio/desktop/file2 │
╰───┴────────────────┴──────────────────────────╯
Are you sure? [y/n]

What do you think? Do you think it makes sense adding this flag? I could help with the development if needed. Thanks.

oberblastmeister commented 2 years ago

I think we could add this flag. I don't know if we should add a confirmation prompt, as trash is a lot less destructive than trash empty, trash restore, or rm. Also, --verbose only implies more output, not a confirmation prompt.

cmessias commented 2 years ago

I agree that just having more output seems better for this

j-lakeman commented 6 months ago

Any update on this? Would also love to see that! Great application!

0n-s commented 3 weeks ago

Would like to see this also work with the short -v arg.

EDIT: I mean just noting the removed files, not the confirmation. I think that's being conflated here & should be implemented separately, like -i, -I, & --interactive in GNU rm.