小编Mat*_*ose的帖子

.bash_profile别名:找不到命令

我无法让我的.bash_profile别名在我的Mac OSX终端上运行.我在〜/目录中创建了一个.bash_profile文件,然后写了两行:

echo bash profile has loaded

alias prof=“open ~/.bash_profile”
Run Code Online (Sandbox Code Playgroud)

我保存并输入终端命令:

. ~/.bash_profile
Run Code Online (Sandbox Code Playgroud)

终端显示:

bash profile has loaded

-bash: alias: /Users/kennethlarose/.bash_profile”: not found
Run Code Online (Sandbox Code Playgroud)

我一直在阅读别名配置文件,我相信我的语法是有效的.我知道配置文件是源代码,因为它显示了echo,但是无论在别名中保存什么命令,终端都会显示相同的"未找到"消息.有谁知道我还能尝试什么?

macos bash alias .bash-profile

11
推荐指数
1
解决办法
1万
查看次数

标签 统计

.bash-profile ×1

alias ×1

bash ×1

macos ×1