Cloudef/xcmenu — pull request #8 by mrak (2014-07-15 20:19:11+00:00)
Title: Fixes trailing newlines caused by bash HEREDOC usage

I didn't touch `urlmode()` since I didn't quite understand it.

I used `printf %s` instead of `echo -n` since the `printf` version is verbatim output whereas the `echo` version may do some post-processing of trailing newlines.