After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 591493 - Options --force and --recursive for gvfs-trash command line tool
Options --force and --recursive for gvfs-trash command line tool
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: general
git master
Other All
: Normal enhancement
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2009-08-11 21:19 UTC by Holger Berndt
Modified: 2009-09-24 21:18 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Patch against f9b0e8a702dfeebbbf60e6baff08 (current master) (1.35 KB, patch)
2009-08-11 21:24 UTC, Holger Berndt
none Details | Review
Second version of the patch with fixed spaces and brackets (1.36 KB, patch)
2009-08-17 15:42 UTC, Holger Berndt
none Details | Review

Description Holger Berndt 2009-08-11 21:19:51 UTC
After a few incidences, I am thinking of aliasing "rm" to "gvfs-trash" on some machines that I maintain. A very common usecase is to do "rm -rf" on some files and directories, to remove the files recusively and not question about anything (especially not about non-existing files). For the alias to work in this common scenario, it would be great if gvfs-trash understood these two options.

--recursive would be a no-op, since gvfs-trash is recursive by default already
--force would check the files for existance, and skip non-existing ones silently

I'll attach a patch against current git master (f9b0e8a702dfee) to this report.
Comment 1 Holger Berndt 2009-08-11 21:24:08 UTC
Created attachment 140487 [details] [review]
Patch against f9b0e8a702dfeebbbf60e6baff08 (current master)
Comment 2 Holger Berndt 2009-08-17 15:42:45 UTC
Created attachment 140970 [details] [review]
Second version of the patch with fixed spaces and brackets
Comment 3 Alexander Larsson 2009-08-24 14:41:23 UTC
I added a version with only --force