@ntnsndr Back in the day (~2010?) there was `gvfs-remove`, but these days it looks like it's spelled `gio trash`.
When I tried to replicate gvfs-remove's behavior w/ a script similar to yours, the biggest thing that jumps out at me is the possibility of accidentally overwriting files in the trashcan when deleting an identically-named file; instead of adding an "(n)" suffix (eg "filename (2).txt"). If you care about not losing things enough to do trash from the CLI, you probably care about this.