I'm using charm at the moment inside a little wrapper script (in Bash) I have which pipes my files through Markdown and SmartyPants for lovely formatting, etc. I just installed MPD/MPC as my music player and wanted to add that to the mix when I post.
Unfortunately, all my attempts end up with Current music: "Godspeed when it should really say Current music: Godspeed You Black Emperor!: Monheim, or some such. I've done a lot of fiddling with different placements of " and ' and without either, but nothing seems to work.
Currently, the little bit of code which does the business looks like this:
# Insert current track, if playing if [[ $(mpc status | grep playing) ]]; then MUSIC="--music "$(mpc status --format '%artist%: %title%' | head -n 1 )"" fi charm -q -s "$SUBJ" "$MUSIC" $@ <<< "$BODY"
Can anyone suggest why this wouldn't work? If I remove the $MUSIC reference from the charm argument string it all works as planned, but I'd really like it to do music too.