I have developed a very similar scheme for myself independently (haven't heard of z before, but thanks). A further idea is another command <code>e</code>, which is used like: <code>e reg1 reg2...</code>, and it will query z's database to see if there is a file in z's directory which matches the regs, and if found, open that file in Emacs. A similar command <code>f</code> will only print the path, so that <code>firefox $(f reg1 reg2)</code> will open the found file using firefox.
[Disclaimer: I don't know rupa at all]