MacOS terminal: Can not access folders with @ in path

时间:2018-12-19 11:35:49

标签: macos terminal

I am facing a strange behavior on my MacOs terminal.

When I try to autocomplete a folder which has an @-sign included all my /etc/hosts entries are shown...

cd /usr/local/Cellar/php@

an then pressing tap shows

@::1                               @localhost.                        @custom-etc-host-entry.domain

I can reproduce this for my user and for root.

Maybe some can help me to find the root cause of this.

Thx in advance.

1 个答案:

答案 0 :(得分:0)

您需要在路径中使用@转义\

cd /usr/local/Cellar/php\@

然后按标签将显示以下内容:

php@5.6/ php@7.2/