Put Back from trash from Terminal
This solution works on a single file in Trash or multiple files deleted from within the same directory:

If it's not essential for you to use Terminal, you can forget all those bash, zsh, and all other typealot ways to do this. Just navigate to Trash and CMD + Backspace the files you want to put back.

If the deleted files come from different folders, then you can't use this shortcut to put them all back at the same time.