Open Mail Attachment with Unix-standard programs
You cannot as the process is controlled by LaunchServices

When an application e.g. Mail.app wants to open a document it launches (or relaunches) the application that reads it and sends information to the document by Apple Events as described in Open Operations

thus the handlers have to recognise these Apple Events which are managed by the Cocoa or Carbon libraries.

So to use emacs, vi etc you need to use one wrapped up as an app e.g. Aquamacs, Cocoa or Carbon version of emacs, MacVim etc.

Another way of thinking about this is if there is no terminal open how woul the Unix command write to the GUI?