[英]Why is terminal not parsing script for .bash_profile ? (goal is for this script to run and show the current working branch)
I hoping someone can answer this question, for I have checked many forums and have not come across any answers.我希望有人能回答这个问题,因为我检查了很多论坛并没有遇到任何答案。
Setup: Mac Big Sur Application used: Terminal设置:Mac Big Sur 使用的应用程序:终端
Goal: I am trying to get my active git directory to show the current branch that I am on.目标:我试图让我的活动 git 目录显示我所在的当前分支。
Her is a screen shot of the issue and also the content of.bash_profile她是问题的截图,也是.bash_profile的内容
Any help on this matter would be very appreciated.对此问题的任何帮助将不胜感激。
Here is the screen shot with zprofile instead:这是使用 zprofile 的屏幕截图:
MacOS Big Sur is in zsh
and the equivalent is ~/.zprofile
MacOS Big Sur 在zsh
中,相当于~/.zprofile
You can use:您可以使用:
cd $HOME
ls -a
To view all your hidden files.查看所有隐藏文件。 If you look closely, there is no .bash_profile
, but there is instead a .zprofile
.如果您仔细观察,没有.bash_profile
,而是有一个.zprofile
。 Maybe this might help you:)也许这可能会帮助你:)
It turns out yes it is a problem with zsh.事实证明是的,这是 zsh 的问题。 I was using ash version.我用的是ash版本。 It needed a zsh version.它需要一个 zsh 版本。 Thanks for the help.谢谢您的帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.