2016-12-01 61 views
-2

enter image description here蘋果的.bash_profile雙引號(直和曲)

在運行別名BB我得到的錯誤。

. .bash_profile 
-bash: alias: off: not found 
-bash: alias: =: not found 
-bash: alias: 「open: not found 
-bash: alias: -e: not found 
-bash: alias: .bash_profile」: not found 

經過進一步的投資,我發現自己應有的方式雙引號從直引號捲曲引號在Mac自動改變。 所以我改變了Mac的鍵盤偏好到直引號現在別名bp工作正常。

我不知道爲什麼捲曲引號沒有在bash中工作,花了我一段時間來找出問題。

+1

你可能會問爲什麼你不能用一對'%'引用一個字符串;直引號是'bash'所期望的。 – chepner

+0

@Andrew Medico等人,這個問題被關閉,說「它的問題不能再生產或一個簡單的印刷錯誤」真的,首先可以複製這個問題,即使它的印刷錯誤,它不是一個「簡單「一個數字。我和我的同事花了差不多一個小時來弄清楚發生了什麼,我們不是新手。 –

回答