Auto convert curly quotes to ascii quotes
Thanks for filing an issue! Please answer the questions below so I can help you.
- iTerm2 version:
- OS version:
- Attach ~/Library/Preferences/com.googlecode.iterm2.plist here (drag-drop from finder into this window)
- Attach a debug log, if possible. Instructions at https://iterm2.com/debuglog
- Are you reporting a performance issue or a hang? Please attach a sample. Instructions at https://gitlab.com/gnachman/iterm2/wikis/HowToSample
- Are you reporting a crash? Please attach the crash log. Instructions at https://gitlab.com/gnachman/iterm2/wikis/crash-logs
- Are you reporting excessive memory usage? Please attach a heap analysis: https://gitlab.com/gnachman/iterm2/wikis/heapshot
Detailed steps to reproduce the problem:
- Ask friend to send you bash cmd line with quotes in Slack. Like echo "cmd" > outfile
- Copy it on your end into clipboard and execute. Result will be unexpected.
What happened: Mac will replace quotes with non-ascii "curly"/smart quotes and outfile will contain not filename, but filename with curly quotes on both ends (which are multibyte utf-8 symbols, not ascii). If contents of outfile is used for actually running cmd, cmd fails to run. This de-rails all related shell scripting. It is because Mac OS does "smart" replacement of quotes for the user. 3. It is possible to avoid issue after you dig it with these steps http://www.iclarified.com/38772/how-to-disable-curly-quotes-in-mac-os-x-mavericks
What should have happened: 4. However, since iTerm2 audience are programmers, I think iTerm shall intercept curly quotes, alert user and allow him to choose to convert them automatically to normal quotes when pasting into terminal.