How to escape double quotes inside copy-to-clipboard macro?

58 views
Skip to first unread message

talha131

unread,
Jun 30, 2018, 3:56:07 PM6/30/18
to TiddlyWiki

I have following block of code that I want to pass to copy-to-clipboard macro

for f in *.wav
    bmtool -v audioConvert -f mp3 "$f"
end

I tried

<<copy-to-clipboard "for f in *.wav
       bmtool -v audioConvert -f mp3 "$f"
end"
>>

But the copied text is terminated right when it encounters first double quite, i.e "$f". Clipboard gets

for f in *.wav
    bmtool -v audioConvert -f mp3 "

How do I get around this?

I have tried,

<<copy-to-clipboard src={{"for f in *.wav
       bmtool -v audioConvert -f mp3 "$f"
end"}}
>>

But this too didn’t work.

BurningTreeC

unread,
Jun 30, 2018, 4:09:51 PM6/30/18
to TiddlyWiki
Hi talha131,

you can wrap the code within triple-quotes:

<<copy-to-clipboard """
for f in *.wav
    bmtool -v audioConvert
-f mp3 "$f"
end
""">>


all the best,
BTC

talha131

unread,
Jun 30, 2018, 4:12:21 PM6/30/18
to TiddlyWiki
Thank you for quick response. Triple quotes solved the issue.
Reply all
Reply to author
Forward
0 new messages