Page 1 of 1

Embedded Shell Scripts and Smart Quotes

PostPosted: Mon Nov 18, 2013 9:12 am
by snortasprocket
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

Re: Embedded Shell Scripts and Smart Quotes

PostPosted: 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.