Embedded Shell Scripts and Smart Quotes

From your noodle to other noodles. Talk about ways to get the most from Hazel. Even exchange recipes for the cool rules you've thought up. DO NOT POST YOUR QUESTIONS HERE.

Moderators: Mr_Noodle, Moderators

Something I discovered today which may be some use to folks who want to use an embedded shell script in a Hazel action: make sure if you put double-quotes around a shell variable that you are actually putting straight double-quotes, not curly quotes.

It turns out that OS X will "correct" straight quotes into curly quotes if you have the option "Use smart quotes and dashes" ticked in the Keyboard prefpane under the "Text" tab.

I burned an hour or two wondering why my shell script was ignoring the quotes I was putting in (and blowing up grep) until I figured this out.

Happy Hazeling!

--sgp
snortasprocket
 
Posts: 1
Joined: Mon Nov 18, 2013 8:46 am

Re: Embedded Shell Scripts and Smart Quotes Tue Nov 19, 2013 1:11 pm • by Mr_Noodle
Yes, this is an unfortunate side-effect of Mavericks. The next release will fix this where smart quotes will always be disabled in the script editors.
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Tips & Tricks - DO NOT POST QUESTIONS