每次我在Mac上打开一个新窗口(或终端)时,它将暂停一两秒钟,然后打印此消息:
-bash: alias: | grep -v 127.0.0.1: not found
fatal: Not a git repository (or any of the parent directories): .git
对我来说很明显,它在每个新窗口上都执行此GREP/GIT命令,但是我无法弄清楚它来自何处,也无法使其停止。
在哪里可以找到此命令?
在preferences -> profiles -> general
中,您可以从"在开始"字段的"发送文本"字段中删除命令。
这将阻止命令每次启动新外壳时都可以运行。
我也有问题,但这不是这个特殊的bash命令。我有一些在.zshrc
文件中运行的命令。
为此,我运行了vim并删除了命令。您的可能看起来像:
# Run your /.zshrc file to confirm that it is the source of your error
source ~/.zshrc
# If it is, open it in vim
vim ~/.zshrc
# While in vim, you can search by hitting the forward-slash key "/" and then
# typing your search word. Navigate through results with the next key "n". Perhaps
# you could search for grep, which shouldn't occur often in your .zshrc file.
/grep
# Remove/fix the offending line