-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Some minor issues that are somewhat related, curious if this can be improved:
-
There's currently lack of
--interactiveaction, e.g.gtrash find --restoreprompts on terminal but can only be--forcewhen not interactive. It would be nice to have e.g.gtrash find --restore --interactiveto always force interactive so that this command can be used anywhere where it must require confirmation before trashing all files. That would allow it to be safely used to replacegtrash findfor convenience and simplicity. -
The extra
Found 1 trashed files. You can restore or remove PERMANENTLY these by --restore, --rm.messages at the end of outputs are a bit verbose, but expending a fork and/or binary call to silence them (e.g.gtrash find | cat) seems unnecessary. How about only include it in--verboseoption or an option for--non-interactiveor--listto only show file entries? Or perhaps use a file descriptor than standard output that can be redirected to/dev/nullwhich seems a little more appropriate than detecting for terminal (which may potentially yield undesirable result).
Unrelated: It doesn't make sense to exit with return code 1 with the error gtrash: error: not found: trashed files for gtrash find when there are zero items in the trash can, right? Seems misleading--I would expect exit 0 since there's no errors and preferably no output since all trash is dealt with.