繁体   English   中英

错误 bash:别名:python.exe':未找到

[英]ERROR bash: alias: python.exe' : not found

每次我启动 Git Bash 我都会收到相同的消息:

bash: alias: python.exe': not found

(注意 python.exe' 之后的单引号)在我看来,在那之后 Git Bash 工作正常,但我不知道为什么会收到此消息。 我的.bashrc文件只有一行代码:

alias python='winpty python.exe'

如果使用$ alias命令,我得到:

alias ipython='winpty ipython.exe'

alias ll='ls -l'

alias ls='ls -F --color=auto --show-control-chars'

alias python='winpty python.exe'

有人可以帮我弄清楚为什么我会收到那个奇怪的信息吗? 先感谢您!

您是否仔细检查过您没有 windows 大引号而是直引号? 我试试这个:

# works fine
$ alias python='winpty python.exe'
# does not work fine
$ alias python=‘winpty python.exe’
bash: alias: python.exe’: not found

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM