mac zshrcにsource実行時にエラー「unmatched “」が発生した場合の解決方法

  • 作成日 2022.10.07
  • mac
mac zshrcにsource実行時にエラー「unmatched “」が発生した場合の解決方法

macで、zshrcにsource実行時にエラー「unmatched “」が発生した場合の解決方法を記述してます。

環境

  • ProductName: macOS
  • ProductVersion: 11.6
  • BuildVersion: 20G165

エラー全文

source ~/.zshrc
                                
/Users/hoge/.zshrc:4: unmatched "                                   

原因

「”」が2つ付いていたため

export PS1="%~""

対処法

「”」を1つ削除する

export PS1="%~"