/用户/ /.zshrc:1:未找到命令: shell

6rvt4ljy  于 2023-04-12  发布在  Shell
关注(0)|答案(1)|浏览(198)

我是个编程新手,由于某些原因,shell不能在我的终端(mac os),iTerm 2或vscode终端上工作。
这是我打开终端时得到的错误:上次登录:Thu Jul 7 17:27:20 on ttys001 /Users/calereeves/.zshrc:1:未找到命令:shell /用户/calereeves/.zshrc:源代码:75:没有这样的文件或目录:/oh-my-zsh.shcalereeves@Cales-MacBook-Pro ~ %
当我运行source ~/.zsh时,它不起作用。但是当我使用vim ~/.zshrc时,它就出现了。上面的shell路径是我在 meta后端开发者课程中被告知要使用的。这就是我所做的全部更改,我甚至不记得最初那里是什么。

shell PATH="/opt/homebrew/opt/python@3.9/libexec/bin:${PATH}" # If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH

# Path to your oh-my-zsh installation.
# export ZSH="$HOME/.oh-my-zsh"

# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="robbyrussell"

# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )

# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"

# Uncomment the following line to use hyphen-insensitive completion.
"~/.zshrc" 101L, 3928B

无论哪种方式,不知道为什么shell不工作摆在首位。任何帮助是非常感谢。我甚至不能运行python shell。

5tmbdcev

5tmbdcev1#

我也遇到过同样的问题,看了你们的讨论,我就解决了。
shell PATH="/opt/homebrew/opt/python@3.x/libexec/bin:${PATH}”
在Vim文本编辑器中删除'shell'。
PATH="/opt/homebrew/opt/python@3.x/libexec/bin:${PATH}”
在课程材料中,我认为 meta不应该把“shell”放在灰色的代码块中,这会让人感到困惑。
日什
shell source ~/.zshrc
Zsh Shell
source ~/.zshrc

相关问题